]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geomBuilder.py
Salome HOME
Improvements for HYDRO module: 1. General mechanism for activation of GUI Geometry...
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup l1_publish_data Publishing results in SALOME study
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ## 
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ## 
50 ## For example, consider the following Python script:
51 ## 
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ## 
60 ## Last two lines can be replaced by one-line instruction:
61 ## 
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ## 
66 ## ... or simply
67 ## 
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ## 
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter 
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) 
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Not that some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## @}
148
149
150 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
151
152 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
153 ## @{
154 ##   @defgroup l2_import_export Importing/exporting geometrical objects
155 ##   @defgroup l2_creating      Creating geometrical objects
156 ##   @{
157 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
158 ##     @{
159 ##       @defgroup l4_curves        Creating Curves
160
161 ##     @}
162 ##     @defgroup l3_3d_primitives Creating 3D Primitives
163 ##     @defgroup l3_complex       Creating Complex Objects
164 ##     @defgroup l3_groups        Working with groups
165 ##     @defgroup l3_blocks        Building by blocks
166 ##     @{
167 ##       @defgroup l4_blocks_measure Check and Improve
168
169 ##     @}
170 ##     @defgroup l3_sketcher      Sketcher
171 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
172 ##     @{
173 ##       @defgroup l4_decompose     Decompose objects
174 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
175 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
176 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
177 ##       @defgroup l4_advanced      Advanced objects creation functions
178
179 ##     @}
180
181 ##   @}
182 ##   @defgroup l2_transforming  Transforming geometrical objects
183 ##   @{
184 ##     @defgroup l3_basic_op      Basic Operations
185 ##     @defgroup l3_boolean       Boolean Operations
186 ##     @defgroup l3_transform     Transformation Operations
187 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
188 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
189 ##     @defgroup l3_blocks_op     Blocks Operations
190 ##     @defgroup l3_healing       Repairing Operations
191 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
192
193 ##   @}
194 ##   @defgroup l2_measure       Using measurement tools
195
196 ## @}
197
198 # initialize SALOME session in try/except block
199 # to avoid problems in some cases, e.g. when generating documentation
200 try:
201     import salome
202     salome.salome_init()
203     from salome import *
204 except:
205     pass
206
207 from salome_notebook import *
208
209 import GEOM
210 import math
211 import os
212
213 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
214
215 # service function
216 def _toListOfNames(_names, _size=-1):
217     l = []
218     import types
219     if type(_names) in [types.ListType, types.TupleType]:
220         for i in _names: l.append(i)
221     elif _names:
222         l.append(_names)
223     if l and len(l) < _size:
224         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
225     return l
226
227 ## Raise an Error, containing the Method_name, if Operation is Failed
228 ## @ingroup l1_geomBuilder_auxiliary
229 def RaiseIfFailed (Method_name, Operation):
230     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
231         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
232
233 ## Return list of variables value from salome notebook
234 ## @ingroup l1_geomBuilder_auxiliary
235 def ParseParameters(*parameters):
236     Result = []
237     StringResult = []
238     for parameter in parameters:
239         if isinstance(parameter, list):
240             lResults = ParseParameters(*parameter)
241             if len(lResults) > 0:
242                 Result.append(lResults[:-1])
243                 StringResult += lResults[-1].split(":")
244                 pass
245             pass
246         else:
247             if isinstance(parameter,str):
248                 if notebook.isVariable(parameter):
249                     Result.append(notebook.get(parameter))
250                 else:
251                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
252                 pass
253             else:
254                 Result.append(parameter)
255                 pass
256             StringResult.append(str(parameter))
257             pass
258         pass
259     if Result:
260         Result.append(":".join(StringResult))
261     else:
262         Result = ":".join(StringResult)
263     return Result
264
265 ## Return list of variables value from salome notebook
266 ## @ingroup l1_geomBuilder_auxiliary
267 def ParseList(list):
268     Result = []
269     StringResult = ""
270     for parameter in list:
271         if isinstance(parameter,str) and notebook.isVariable(parameter):
272             Result.append(str(notebook.get(parameter)))
273             pass
274         else:
275             Result.append(str(parameter))
276             pass
277
278         StringResult = StringResult + str(parameter)
279         StringResult = StringResult + ":"
280         pass
281     StringResult = StringResult[:len(StringResult)-1]
282     return Result, StringResult
283
284 ## Return list of variables value from salome notebook
285 ## @ingroup l1_geomBuilder_auxiliary
286 def ParseSketcherCommand(command):
287     Result = ""
288     StringResult = ""
289     sections = command.split(":")
290     for section in sections:
291         parameters = section.split(" ")
292         paramIndex = 1
293         for parameter in parameters:
294             if paramIndex > 1 and parameter.find("'") != -1:
295                 parameter = parameter.replace("'","")
296                 if notebook.isVariable(parameter):
297                     Result = Result + str(notebook.get(parameter)) + " "
298                     pass
299                 else:
300                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
301                     pass
302                 pass
303             else:
304                 Result = Result + str(parameter) + " "
305                 pass
306             if paramIndex > 1:
307                 StringResult = StringResult + parameter
308                 StringResult = StringResult + ":"
309                 pass
310             paramIndex = paramIndex + 1
311             pass
312         Result = Result[:len(Result)-1] + ":"
313         pass
314     Result = Result[:len(Result)-1]
315     return Result, StringResult
316
317 ## Helper function which can be used to pack the passed string to the byte data.
318 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
319 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
320 ## For example,
321 ## \code
322 ## val = PackData("10001110") # val = 0xAE
323 ## val = PackData("1")        # val = 0x80
324 ## \endcode
325 ## @param data unpacked data - a string containing '1' and '0' symbols
326 ## @return data packed to the byte stream
327 ## @ingroup l1_geomBuilder_auxiliary
328 def PackData(data):
329     """
330     Helper function which can be used to pack the passed string to the byte data.
331     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
332     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
333
334     Parameters:
335         data unpacked data - a string containing '1' and '0' symbols
336
337     Returns:
338         data packed to the byte stream
339         
340     Example of usage:
341         val = PackData("10001110") # val = 0xAE
342         val = PackData("1")        # val = 0x80
343     """
344     bytes = len(data)/8
345     if len(data)%8: bytes += 1
346     res = ""
347     for b in range(bytes):
348         d = data[b*8:(b+1)*8]
349         val = 0
350         for i in range(8):
351             val *= 2
352             if i < len(d):
353                 if d[i] == "1": val += 1
354                 elif d[i] != "0":
355                     raise "Invalid symbol %s" % d[i]
356                 pass
357             pass
358         res += chr(val)
359         pass
360     return res
361
362 ## Read bitmap texture from the text file.
363 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
364 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
365 ## The function returns width and height of the pixmap in pixels and byte stream representing
366 ## texture bitmap itself.
367 ##
368 ## This function can be used to read the texture to the byte stream in order to pass it to
369 ## the AddTexture() function of geomBuilder class.
370 ## For example,
371 ## \code
372 ## from salome.geom import geomBuilder
373 ## geompy = geomBuilder.New(salome.myStudy)
374 ## texture = geompy.readtexture('mytexture.dat')
375 ## texture = geompy.AddTexture(*texture)
376 ## obj.SetMarkerTexture(texture)
377 ## \endcode
378 ## @param fname texture file name
379 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
380 ## @ingroup l1_geomBuilder_auxiliary
381 def ReadTexture(fname):
382     """
383     Read bitmap texture from the text file.
384     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
385     A zero symbol ('0') represents transparent pixel of the texture bitmap.
386     The function returns width and height of the pixmap in pixels and byte stream representing
387     texture bitmap itself.
388     This function can be used to read the texture to the byte stream in order to pass it to
389     the AddTexture() function of geomBuilder class.
390     
391     Parameters:
392         fname texture file name
393
394     Returns:
395         sequence of tree values: texture's width, height in pixels and its byte stream
396     
397     Example of usage:
398         from salome.geom import geomBuilder
399         geompy = geomBuilder.New(salome.myStudy)
400         texture = geompy.readtexture('mytexture.dat')
401         texture = geompy.AddTexture(*texture)
402         obj.SetMarkerTexture(texture)
403     """
404     try:
405         f = open(fname)
406         lines = [ l.strip() for l in f.readlines()]
407         f.close()
408         maxlen = 0
409         if lines: maxlen = max([len(x) for x in lines])
410         lenbytes = maxlen/8
411         if maxlen%8: lenbytes += 1
412         bytedata=""
413         for line in lines:
414             if len(line)%8:
415                 lenline = (len(line)/8+1)*8
416                 pass
417             else:
418                 lenline = (len(line)/8)*8
419                 pass
420             for i in range(lenline/8):
421                 byte=""
422                 for j in range(8):
423                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
424                     else: byte += "0"
425                     pass
426                 bytedata += PackData(byte)
427                 pass
428             for i in range(lenline/8, lenbytes):
429                 bytedata += PackData("0")
430             pass
431         return lenbytes*8, len(lines), bytedata
432     except:
433         pass
434     return 0, 0, ""
435
436 ## Returns a long value from enumeration type
437 #  Can be used for CORBA enumerator types like GEOM.shape_type
438 #  @param theItem enumeration type
439 #  @ingroup l1_geomBuilder_auxiliary
440 def EnumToLong(theItem):
441     """
442     Returns a long value from enumeration type
443     Can be used for CORBA enumerator types like geomBuilder.ShapeType
444
445     Parameters:
446         theItem enumeration type
447     """
448     ret = theItem
449     if hasattr(theItem, "_v"): ret = theItem._v
450     return ret
451
452 ## Information about closed/unclosed state of shell or wire
453 #  @ingroup l1_geomBuilder_auxiliary
454 class info:
455     """
456     Information about closed/unclosed state of shell or wire
457     """
458     UNKNOWN  = 0
459     CLOSED   = 1
460     UNCLOSED = 2
461
462 ##! Private class used to bind calls of plugin operations to geomBuilder
463 class PluginOperation:
464   def __init__(self, operation, function):
465     self.operation = operation
466     self.function = function
467     pass
468
469   def __call__(self, *args):
470     res = self.function(self.operation, *args)
471     RaiseIfFailed(self.function.__name__, self.operation)
472     return res
473
474 # Warning: geom is a singleton
475 geom = None
476 engine = None
477 doLcc = False
478 created = False
479
480 class geomBuilder(object, GEOM._objref_GEOM_Gen):
481
482         ## Enumeration ShapeType as a dictionary. \n
483         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
484         #  @ingroup l1_geomBuilder_auxiliary
485         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
486
487         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
488         #  and a list of parameters, describing the shape.
489         #  List of parameters, describing the shape:
490         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
491         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
492         #
493         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
494         #
495         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
496         #
497         #  - SPHERE:       [xc yc zc            R]
498         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
499         #  - BOX:          [xc yc zc                      ax ay az]
500         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
501         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
502         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
503         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
504         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
505         #
506         #  - SPHERE2D:     [xc yc zc            R]
507         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
508         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
509         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
510         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
511         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
512         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
513         #  - PLANE:        [xo yo zo  dx dy dz]
514         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
515         #  - FACE:                                       [nb_edges  nb_vertices]
516         #
517         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
518         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
519         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
520         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
521         #  - LINE:         [xo yo zo  dx dy dz]
522         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
523         #  - EDGE:                                                 [nb_vertices]
524         #
525         #  - VERTEX:       [x  y  z]
526         #  @ingroup l1_geomBuilder_auxiliary
527         kind = GEOM.GEOM_IKindOfShape
528
529         def __new__(cls):
530             global engine
531             global geom
532             global doLcc
533             global created
534             #print "==== __new__ ", engine, geom, doLcc, created
535             if geom is None:
536                 # geom engine is either retrieved from engine, or created
537                 geom = engine
538                 # Following test avoids a recursive loop
539                 if doLcc:
540                     if geom is not None:
541                         # geom engine not created: existing engine found
542                         doLcc = False
543                     if doLcc and not created:
544                         doLcc = False
545                         # FindOrLoadComponent called:
546                         # 1. CORBA resolution of server
547                         # 2. the __new__ method is called again
548                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
549                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
550                         #print "====1 ",geom
551                 else:
552                     # FindOrLoadComponent not called
553                     if geom is None:
554                         # geomBuilder instance is created from lcc.FindOrLoadComponent
555                         #print "==== super ", engine, geom, doLcc, created
556                         geom = super(geomBuilder,cls).__new__(cls)
557                         #print "====2 ",geom
558                     else:
559                         # geom engine not created: existing engine found
560                         #print "==== existing ", engine, geom, doLcc, created
561                         pass
562                 #print "return geom 1 ", geom
563                 return geom
564
565             #print "return geom 2 ", geom
566             return geom
567
568         def __init__(self):
569             global created
570             #print "-------- geomBuilder __init__ --- ", created, self
571             if not created:
572               created = True
573               GEOM._objref_GEOM_Gen.__init__(self)
574               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
575               self.myBuilder = None
576               self.myStudyId = 0
577               self.father    = None
578
579               self.BasicOp  = None
580               self.CurvesOp = None
581               self.PrimOp   = None
582               self.ShapesOp = None
583               self.HealOp   = None
584               self.InsertOp = None
585               self.BoolOp   = None
586               self.TrsfOp   = None
587               self.LocalOp  = None
588               self.MeasuOp  = None
589               self.BlocksOp = None
590               self.GroupOp  = None
591               self.AdvOp    = None
592             pass
593
594         ## Process object publication in the study, as follows:
595         #  - if @a theName is specified (not None), the object is published in the study
596         #    with this name, not taking into account "auto-publishing" option;
597         #  - if @a theName is NOT specified, the object is published in the study
598         #    (using default name, which can be customized using @a theDefaultName parameter)
599         #    only if auto-publishing is switched on.
600         #
601         #  @param theObj  object, a subject for publishing
602         #  @param theName object name for study
603         #  @param theDefaultName default name for the auto-publishing
604         #
605         #  @sa addToStudyAuto()
606         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
607             # ---
608             def _item_name(_names, _defname, _idx=-1):
609                 if not _names: _names = _defname
610                 if type(_names) in [types.ListType, types.TupleType]:
611                     if _idx >= 0:
612                         if _idx >= len(_names) or not _names[_idx]:
613                             if type(_defname) not in [types.ListType, types.TupleType]:
614                                 _name = "%s_%d"%(_defname, _idx+1)
615                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
616                                 _name = _defname[_idx]
617                             else:
618                                 _name = "%noname_%d"%(dn, _idx+1)
619                             pass
620                         else:
621                             _name = _names[_idx]
622                         pass
623                     else:
624                         # must be wrong  usage
625                         _name = _names[0]
626                     pass
627                 else:
628                     if _idx >= 0:
629                         _name = "%s_%d"%(_names, _idx+1)
630                     else:
631                         _name = _names
632                     pass
633                 return _name
634             # ---
635             if not theObj:
636                 return # null object
637             if not theName and not self.myMaxNbSubShapesAllowed:
638                 return # nothing to do: auto-publishing is disabled
639             if not theName and not theDefaultName:
640                 return # neither theName nor theDefaultName is given
641             import types
642             if type(theObj) in [types.ListType, types.TupleType]:
643                 # list of objects is being published
644                 idx = 0
645                 for obj in theObj:
646                     if not obj: continue # bad object
647                     ###if obj.GetStudyEntry(): continue # already published
648                     name = _item_name(theName, theDefaultName, idx)
649                     if obj.IsMainShape() or not obj.GetMainShape().GetStudyEntry():
650                         self.addToStudy(obj, name) # "%s_%d"%(aName, idx)
651                     else:
652                         self.addToStudyInFather(obj.GetMainShape(), obj, name) # "%s_%d"%(aName, idx)
653                         pass
654                     idx = idx+1
655                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
656                     pass
657                 pass
658             else:
659                 # single object is published
660                 ###if theObj.GetStudyEntry(): return # already published
661                 name = _item_name(theName, theDefaultName)
662                 if theObj.IsMainShape():
663                     self.addToStudy(theObj, name)
664                 else:
665                     self.addToStudyInFather(theObj.GetMainShape(), theObj, name)
666                     pass
667                 pass
668             pass
669
670         ## @addtogroup l1_geomBuilder_auxiliary
671         ## @{
672         def init_geom(self,theStudy):
673             self.myStudy = theStudy
674             self.myStudyId = self.myStudy._get_StudyId()
675             self.myBuilder = self.myStudy.NewBuilder()
676             self.father = self.myStudy.FindComponent("GEOM")
677             if self.father is None:
678                 self.father = self.myBuilder.NewComponent("GEOM")
679                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
680                 FName = A1._narrow(SALOMEDS.AttributeName)
681                 FName.SetValue("Geometry")
682                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
683                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
684                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
685                 self.myBuilder.DefineComponentInstance(self.father,self)
686                 pass
687             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
688             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
689             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
690             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
691             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
692             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
693             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
694             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
695             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
696             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
697             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
698             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
699             #self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
700             self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
701             # set GEOM as root in the use case tree
702             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
703             self.myUseCaseBuilder.SetRootCurrent()
704             self.myUseCaseBuilder.Append(self.father)
705             pass
706
707         def GetPluginOperations(self, studyID, libraryName):
708             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
709             if op:
710                 # bind methods of operations to self
711                 methods = op.__class__.__dict__['__methods__']
712                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
713                 for meth_name in methods:
714                     if not meth_name in avoid_methods: # avoid basic methods
715                         function = getattr(op.__class__, meth_name)
716                         if callable(function):
717                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
718                             self.__dict__[meth_name] = PluginOperation(op, function)
719             return op
720
721         ## Enable / disable results auto-publishing
722         # 
723         #  The automatic publishing is managed in the following way:
724         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
725         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
726         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
727         #  value passed as parameter has the same effect.
728         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
729         #  maximum number of sub-shapes allowed for publishing is set to specified value.
730         #
731         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
732         #  @ingroup l1_publish_data
733         def addToStudyAuto(self, maxNbSubShapes=-1):
734             """
735             Enable / disable results auto-publishing
736
737             The automatic publishing is managed in the following way:
738             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
739             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
740             maximum number of sub-shapes allowed for publishing is unlimited; any negative
741             value passed as parameter has the same effect.
742             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
743             maximum number of sub-shapes allowed for publishing is set to this value.
744
745             Parameters:
746                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
747
748             Example of usage:
749                 geompy.addToStudyAuto()   # enable auto-publishing
750                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
751                 geompy.addToStudyAuto(0)  # disable auto-publishing
752             """
753             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
754             pass
755
756         ## Dump component to the Python script
757         #  This method overrides IDL function to allow default values for the parameters.
758         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
759             """
760             Dump component to the Python script
761             This method overrides IDL function to allow default values for the parameters.
762             """
763             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
764
765         ## Get name for sub-shape aSubObj of shape aMainObj
766         #
767         # @ref swig_SubShapeName "Example"
768         def SubShapeName(self,aSubObj, aMainObj):
769             """
770             Get name for sub-shape aSubObj of shape aMainObj
771             """
772             # Example: see GEOM_TestAll.py
773
774             #aSubId  = orb.object_to_string(aSubObj)
775             #aMainId = orb.object_to_string(aMainObj)
776             #index = gg.getIndexTopology(aSubId, aMainId)
777             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
778             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
779             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
780             return name
781
782         ## Publish in study aShape with name aName
783         #
784         #  \param aShape the shape to be published
785         #  \param aName  the name for the shape
786         #  \param doRestoreSubShapes if True, finds and publishes also
787         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
788         #         and published sub-shapes of arguments
789         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
790         #                                                  these arguments description
791         #  \return study entry of the published shape in form of string
792         #
793         #  @ingroup l1_publish_data
794         #  @ref swig_all_addtostudy "Example"
795         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
796                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
797             """
798             Publish in study aShape with name aName
799
800             Parameters:
801                 aShape the shape to be published
802                 aName  the name for the shape
803                 doRestoreSubShapes if True, finds and publishes also
804                                    sub-shapes of aShape, corresponding to its arguments
805                                    and published sub-shapes of arguments
806                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
807                                                          these arguments description
808
809             Returns:
810                 study entry of the published shape in form of string
811
812             Example of usage:
813                 id_block1 = geompy.addToStudy(Block1, "Block 1")
814             """
815             # Example: see GEOM_TestAll.py
816             try:
817                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
818                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
819                 if doRestoreSubShapes:
820                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
821                                             theFindMethod, theInheritFirstArg, True )
822             except:
823                 print "addToStudy() failed"
824                 return ""
825             return aShape.GetStudyEntry()
826
827         ## Publish in study aShape with name aName as sub-object of previously published aFather
828         #  \param aFather previously published object
829         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
830         #  \param aName  the name for the shape
831         #
832         #  \return study entry of the published shape in form of string
833         #
834         #  @ingroup l1_publish_data
835         #  @ref swig_all_addtostudyInFather "Example"
836         def addToStudyInFather(self, aFather, aShape, aName):
837             """
838             Publish in study aShape with name aName as sub-object of previously published aFather
839
840             Parameters:
841                 aFather previously published object
842                 aShape the shape to be published as sub-object of aFather
843                 aName  the name for the shape
844
845             Returns:
846                 study entry of the published shape in form of string
847             """
848             # Example: see GEOM_TestAll.py
849             try:
850                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
851                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
852             except:
853                 print "addToStudyInFather() failed"
854                 return ""
855             return aShape.GetStudyEntry()
856
857         ## Unpublish object in study
858         #
859         #  \param obj the object to be unpublished
860         def hideInStudy(self, obj):
861             """
862             Unpublish object in study
863
864             Parameters:
865                 obj the object to be unpublished
866             """
867             ior = salome.orb.object_to_string(obj)
868             aSObject = self.myStudy.FindObjectIOR(ior)
869             if aSObject is not None:
870                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
871                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
872                 drwAttribute.SetDrawable(False)
873                 pass
874
875         # end of l1_geomBuilder_auxiliary
876         ## @}
877
878         ## @addtogroup l3_restore_ss
879         ## @{
880
881         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
882         #  To be used from python scripts out of addToStudy() (non-default usage)
883         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
884         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
885         #                   If this list is empty, all operation arguments will be published
886         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
887         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
888         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
889         #                            Do not publish sub-shapes in place of arguments, but only
890         #                            in place of sub-shapes of the first argument,
891         #                            because the whole shape corresponds to the first argument.
892         #                            Mainly to be used after transformations, but it also can be
893         #                            usefull after partition with one object shape, and some other
894         #                            operations, where only the first argument has to be considered.
895         #                            If theObject has only one argument shape, this flag is automatically
896         #                            considered as True, not regarding really passed value.
897         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
898         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
899         #  \return list of published sub-shapes
900         #
901         #  @ref tui_restore_prs_params "Example"
902         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
903                               theInheritFirstArg=False, theAddPrefix=True):
904             """
905             Publish sub-shapes, standing for arguments and sub-shapes of arguments
906             To be used from python scripts out of geompy.addToStudy (non-default usage)
907
908             Parameters:
909                 theObject published GEOM.GEOM_Object, arguments of which will be published
910                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
911                           If this list is empty, all operation arguments will be published
912                 theFindMethod method to search sub-shapes, corresponding to arguments and
913                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
914                 theInheritFirstArg set properties of the first argument for theObject.
915                                    Do not publish sub-shapes in place of arguments, but only
916                                    in place of sub-shapes of the first argument,
917                                    because the whole shape corresponds to the first argument.
918                                    Mainly to be used after transformations, but it also can be
919                                    usefull after partition with one object shape, and some other
920                                    operations, where only the first argument has to be considered.
921                                    If theObject has only one argument shape, this flag is automatically
922                                    considered as True, not regarding really passed value.
923                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
924                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
925             Returns:
926                 list of published sub-shapes
927             """
928             # Example: see GEOM_TestAll.py
929             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
930                                           theFindMethod, theInheritFirstArg, theAddPrefix)
931
932         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
933         #  To be used from python scripts out of addToStudy() (non-default usage)
934         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
935         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
936         #                   If this list is empty, all operation arguments will be published
937         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
938         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
939         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
940         #                            Do not publish sub-shapes in place of arguments, but only
941         #                            in place of sub-shapes of the first argument,
942         #                            because the whole shape corresponds to the first argument.
943         #                            Mainly to be used after transformations, but it also can be
944         #                            usefull after partition with one object shape, and some other
945         #                            operations, where only the first argument has to be considered.
946         #                            If theObject has only one argument shape, this flag is automatically
947         #                            considered as True, not regarding really passed value.
948         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
949         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
950         #  \return list of published sub-shapes
951         #
952         #  @ref tui_restore_prs_params "Example"
953         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
954                                    theInheritFirstArg=False, theAddPrefix=True):
955             """
956             Publish sub-shapes, standing for arguments and sub-shapes of arguments
957             To be used from python scripts out of geompy.addToStudy() (non-default usage)
958
959             Parameters:
960                 theObject published GEOM.GEOM_Object, arguments of which will be published
961                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
962                           If this list is empty, all operation arguments will be published
963                 theFindMethod method to search sub-shapes, corresponding to arguments and
964                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
965                 theInheritFirstArg set properties of the first argument for theObject.
966                                    Do not publish sub-shapes in place of arguments, but only
967                                    in place of sub-shapes of the first argument,
968                                    because the whole shape corresponds to the first argument.
969                                    Mainly to be used after transformations, but it also can be
970                                    usefull after partition with one object shape, and some other
971                                    operations, where only the first argument has to be considered.
972                                    If theObject has only one argument shape, this flag is automatically
973                                    considered as True, not regarding really passed value.
974                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
975                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
976
977             Returns: 
978                 list of published sub-shapes
979             """
980             # Example: see GEOM_TestAll.py
981             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
982                                                theFindMethod, theInheritFirstArg, theAddPrefix)
983
984         # end of l3_restore_ss
985         ## @}
986
987         ## @addtogroup l3_basic_go
988         ## @{
989
990         ## Create point by three coordinates.
991         #  @param theX The X coordinate of the point.
992         #  @param theY The Y coordinate of the point.
993         #  @param theZ The Z coordinate of the point.
994         #  @param theName Object name; when specified, this parameter is used
995         #         for result publication in the study. Otherwise, if automatic
996         #         publication is switched on, default value is used for result name.
997         #
998         #  @return New GEOM.GEOM_Object, containing the created point.
999         #
1000         #  @ref tui_creation_point "Example"
1001         def MakeVertex(self, theX, theY, theZ, theName=None):
1002             """
1003             Create point by three coordinates.
1004
1005             Parameters:
1006                 theX The X coordinate of the point.
1007                 theY The Y coordinate of the point.
1008                 theZ The Z coordinate of the point.
1009                 theName Object name; when specified, this parameter is used
1010                         for result publication in the study. Otherwise, if automatic
1011                         publication is switched on, default value is used for result name.
1012                 
1013             Returns: 
1014                 New GEOM.GEOM_Object, containing the created point.
1015             """
1016             # Example: see GEOM_TestAll.py
1017             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1018             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1019             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1020             anObj.SetParameters(Parameters)
1021             self._autoPublish(anObj, theName, "vertex")
1022             return anObj
1023
1024         ## Create a point, distant from the referenced point
1025         #  on the given distances along the coordinate axes.
1026         #  @param theReference The referenced point.
1027         #  @param theX Displacement from the referenced point along OX axis.
1028         #  @param theY Displacement from the referenced point along OY axis.
1029         #  @param theZ Displacement from the referenced point along OZ axis.
1030         #  @param theName Object name; when specified, this parameter is used
1031         #         for result publication in the study. Otherwise, if automatic
1032         #         publication is switched on, default value is used for result name.
1033         #
1034         #  @return New GEOM.GEOM_Object, containing the created point.
1035         #
1036         #  @ref tui_creation_point "Example"
1037         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1038             """
1039             Create a point, distant from the referenced point
1040             on the given distances along the coordinate axes.
1041
1042             Parameters:
1043                 theReference The referenced point.
1044                 theX Displacement from the referenced point along OX axis.
1045                 theY Displacement from the referenced point along OY axis.
1046                 theZ Displacement from the referenced point along OZ axis.
1047                 theName Object name; when specified, this parameter is used
1048                         for result publication in the study. Otherwise, if automatic
1049                         publication is switched on, default value is used for result name.
1050
1051             Returns:
1052                 New GEOM.GEOM_Object, containing the created point.
1053             """
1054             # Example: see GEOM_TestAll.py
1055             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1056             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1057             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1058             anObj.SetParameters(Parameters)
1059             self._autoPublish(anObj, theName, "vertex")
1060             return anObj
1061
1062         ## Create a point, corresponding to the given parameter on the given curve.
1063         #  @param theRefCurve The referenced curve.
1064         #  @param theParameter Value of parameter on the referenced curve.
1065         #  @param theName Object name; when specified, this parameter is used
1066         #         for result publication in the study. Otherwise, if automatic
1067         #         publication is switched on, default value is used for result name.
1068         #
1069         #  @return New GEOM.GEOM_Object, containing the created point.
1070         #
1071         #  @ref tui_creation_point "Example"
1072         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1073             """
1074             Create a point, corresponding to the given parameter on the given curve.
1075
1076             Parameters:
1077                 theRefCurve The referenced curve.
1078                 theParameter Value of parameter on the referenced curve.
1079                 theName Object name; when specified, this parameter is used
1080                         for result publication in the study. Otherwise, if automatic
1081                         publication is switched on, default value is used for result name.
1082
1083             Returns:
1084                 New GEOM.GEOM_Object, containing the created point.
1085
1086             Example of usage:
1087                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1088             """
1089             # Example: see GEOM_TestAll.py
1090             theParameter, Parameters = ParseParameters(theParameter)
1091             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1092             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1093             anObj.SetParameters(Parameters)
1094             self._autoPublish(anObj, theName, "vertex")
1095             return anObj
1096
1097         ## Create a point by projection give coordinates on the given curve
1098         #  @param theRefCurve The referenced curve.
1099         #  @param theX X-coordinate in 3D space
1100         #  @param theY Y-coordinate in 3D space
1101         #  @param theZ Z-coordinate in 3D space
1102         #  @param theName Object name; when specified, this parameter is used
1103         #         for result publication in the study. Otherwise, if automatic
1104         #         publication is switched on, default value is used for result name.
1105         #
1106         #  @return New GEOM.GEOM_Object, containing the created point.
1107         #
1108         #  @ref tui_creation_point "Example"
1109         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1110             """
1111             Create a point by projection give coordinates on the given curve
1112             
1113             Parameters:
1114                 theRefCurve The referenced curve.
1115                 theX X-coordinate in 3D space
1116                 theY Y-coordinate in 3D space
1117                 theZ Z-coordinate in 3D space
1118                 theName Object name; when specified, this parameter is used
1119                         for result publication in the study. Otherwise, if automatic
1120                         publication is switched on, default value is used for result name.
1121
1122             Returns:
1123                 New GEOM.GEOM_Object, containing the created point.
1124
1125             Example of usage:
1126                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1127             """
1128             # Example: see GEOM_TestAll.py
1129             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1130             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1131             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1132             anObj.SetParameters(Parameters)
1133             self._autoPublish(anObj, theName, "vertex")
1134             return anObj
1135
1136         ## Create a point, corresponding to the given length on the given curve.
1137         #  @param theRefCurve The referenced curve.
1138         #  @param theLength Length on the referenced curve. It can be negative.
1139         #  @param theStartPoint Point allowing to choose the direction for the calculation
1140         #                       of the length. If None, start from the first point of theRefCurve.
1141         #  @param theName Object name; when specified, this parameter is used
1142         #         for result publication in the study. Otherwise, if automatic
1143         #         publication is switched on, default value is used for result name.
1144         #
1145         #  @return New GEOM.GEOM_Object, containing the created point.
1146         #
1147         #  @ref tui_creation_point "Example"
1148         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1149             """
1150             Create a point, corresponding to the given length on the given curve.
1151
1152             Parameters:
1153                 theRefCurve The referenced curve.
1154                 theLength Length on the referenced curve. It can be negative.
1155                 theStartPoint Point allowing to choose the direction for the calculation
1156                               of the length. If None, start from the first point of theRefCurve.
1157                 theName Object name; when specified, this parameter is used
1158                         for result publication in the study. Otherwise, if automatic
1159                         publication is switched on, default value is used for result name.
1160
1161             Returns:
1162                 New GEOM.GEOM_Object, containing the created point.
1163             """
1164             # Example: see GEOM_TestAll.py
1165             theLength, Parameters = ParseParameters(theLength)
1166             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1167             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1168             anObj.SetParameters(Parameters)
1169             self._autoPublish(anObj, theName, "vertex")
1170             return anObj
1171
1172         ## Create a point, corresponding to the given parameters on the
1173         #    given surface.
1174         #  @param theRefSurf The referenced surface.
1175         #  @param theUParameter Value of U-parameter on the referenced surface.
1176         #  @param theVParameter Value of V-parameter on the referenced surface.
1177         #  @param theName Object name; when specified, this parameter is used
1178         #         for result publication in the study. Otherwise, if automatic
1179         #         publication is switched on, default value is used for result name.
1180         #
1181         #  @return New GEOM.GEOM_Object, containing the created point.
1182         #
1183         #  @ref swig_MakeVertexOnSurface "Example"
1184         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1185             """
1186             Create a point, corresponding to the given parameters on the
1187             given surface.
1188
1189             Parameters:
1190                 theRefSurf The referenced surface.
1191                 theUParameter Value of U-parameter on the referenced surface.
1192                 theVParameter Value of V-parameter on the referenced surface.
1193                 theName Object name; when specified, this parameter is used
1194                         for result publication in the study. Otherwise, if automatic
1195                         publication is switched on, default value is used for result name.
1196
1197             Returns:
1198                 New GEOM.GEOM_Object, containing the created point.
1199
1200             Example of usage:
1201                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1202             """
1203             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1204             # Example: see GEOM_TestAll.py
1205             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1206             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1207             anObj.SetParameters(Parameters);
1208             self._autoPublish(anObj, theName, "vertex")
1209             return anObj
1210
1211         ## Create a point by projection give coordinates on the given surface
1212         #  @param theRefSurf The referenced surface.
1213         #  @param theX X-coordinate in 3D space
1214         #  @param theY Y-coordinate in 3D space
1215         #  @param theZ Z-coordinate in 3D space
1216         #  @param theName Object name; when specified, this parameter is used
1217         #         for result publication in the study. Otherwise, if automatic
1218         #         publication is switched on, default value is used for result name.
1219         #
1220         #  @return New GEOM.GEOM_Object, containing the created point.
1221         #
1222         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1223         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1224             """
1225             Create a point by projection give coordinates on the given surface
1226
1227             Parameters:
1228                 theRefSurf The referenced surface.
1229                 theX X-coordinate in 3D space
1230                 theY Y-coordinate in 3D space
1231                 theZ Z-coordinate in 3D space
1232                 theName Object name; when specified, this parameter is used
1233                         for result publication in the study. Otherwise, if automatic
1234                         publication is switched on, default value is used for result name.
1235
1236             Returns:
1237                 New GEOM.GEOM_Object, containing the created point.
1238
1239             Example of usage:
1240                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1241             """
1242             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1243             # Example: see GEOM_TestAll.py
1244             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1245             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1246             anObj.SetParameters(Parameters);
1247             self._autoPublish(anObj, theName, "vertex")
1248             return anObj
1249
1250         ## Create a point, which lays on the given face.
1251         #  The point will lay in arbitrary place of the face.
1252         #  The only condition on it is a non-zero distance to the face boundary.
1253         #  Such point can be used to uniquely identify the face inside any
1254         #  shape in case, when the shape does not contain overlapped faces.
1255         #  @param theFace The referenced face.
1256         #  @param theName Object name; when specified, this parameter is used
1257         #         for result publication in the study. Otherwise, if automatic
1258         #         publication is switched on, default value is used for result name.
1259         #
1260         #  @return New GEOM.GEOM_Object, containing the created point.
1261         #
1262         #  @ref swig_MakeVertexInsideFace "Example"
1263         def MakeVertexInsideFace (self, theFace, theName=None):
1264             """
1265             Create a point, which lays on the given face.
1266             The point will lay in arbitrary place of the face.
1267             The only condition on it is a non-zero distance to the face boundary.
1268             Such point can be used to uniquely identify the face inside any
1269             shape in case, when the shape does not contain overlapped faces.
1270
1271             Parameters:
1272                 theFace The referenced face.
1273                 theName Object name; when specified, this parameter is used
1274                         for result publication in the study. Otherwise, if automatic
1275                         publication is switched on, default value is used for result name.
1276
1277             Returns:
1278                 New GEOM.GEOM_Object, containing the created point.
1279
1280             Example of usage:
1281                 p_on_face = geompy.MakeVertexInsideFace(Face)
1282             """
1283             # Example: see GEOM_TestAll.py
1284             anObj = self.BasicOp.MakePointOnFace(theFace)
1285             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1286             self._autoPublish(anObj, theName, "vertex")
1287             return anObj
1288
1289         ## Create a point on intersection of two lines.
1290         #  @param theRefLine1, theRefLine2 The referenced lines.
1291         #  @param theName Object name; when specified, this parameter is used
1292         #         for result publication in the study. Otherwise, if automatic
1293         #         publication is switched on, default value is used for result name.
1294         #
1295         #  @return New GEOM.GEOM_Object, containing the created point.
1296         #
1297         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1298         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1299             """
1300             Create a point on intersection of two lines.
1301
1302             Parameters:
1303                 theRefLine1, theRefLine2 The referenced lines.
1304                 theName Object name; when specified, this parameter is used
1305                         for result publication in the study. Otherwise, if automatic
1306                         publication is switched on, default value is used for result name.
1307
1308             Returns:
1309                 New GEOM.GEOM_Object, containing the created point.
1310             """
1311             # Example: see GEOM_TestAll.py
1312             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1313             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1314             self._autoPublish(anObj, theName, "vertex")
1315             return anObj
1316
1317         ## Create a tangent, corresponding to the given parameter on the given curve.
1318         #  @param theRefCurve The referenced curve.
1319         #  @param theParameter Value of parameter on the referenced curve.
1320         #  @param theName Object name; when specified, this parameter is used
1321         #         for result publication in the study. Otherwise, if automatic
1322         #         publication is switched on, default value is used for result name.
1323         #
1324         #  @return New GEOM.GEOM_Object, containing the created tangent.
1325         #
1326         #  @ref swig_MakeTangentOnCurve "Example"
1327         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1328             """
1329             Create a tangent, corresponding to the given parameter on the given curve.
1330
1331             Parameters:
1332                 theRefCurve The referenced curve.
1333                 theParameter Value of parameter on the referenced curve.
1334                 theName Object name; when specified, this parameter is used
1335                         for result publication in the study. Otherwise, if automatic
1336                         publication is switched on, default value is used for result name.
1337
1338             Returns:
1339                 New GEOM.GEOM_Object, containing the created tangent.
1340
1341             Example of usage:
1342                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1343             """
1344             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1345             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1346             self._autoPublish(anObj, theName, "tangent")
1347             return anObj
1348
1349         ## Create a tangent plane, corresponding to the given parameter on the given face.
1350         #  @param theFace The face for which tangent plane should be built.
1351         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1352         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1353         #  @param theTrimSize the size of plane.
1354         #  @param theName Object name; when specified, this parameter is used
1355         #         for result publication in the study. Otherwise, if automatic
1356         #         publication is switched on, default value is used for result name.
1357         #
1358         #  @return New GEOM.GEOM_Object, containing the created tangent.
1359         #
1360         #  @ref swig_MakeTangentPlaneOnFace "Example"
1361         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1362             """
1363             Create a tangent plane, corresponding to the given parameter on the given face.
1364
1365             Parameters:
1366                 theFace The face for which tangent plane should be built.
1367                 theParameterV vertical value of the center point (0.0 - 1.0).
1368                 theParameterU horisontal value of the center point (0.0 - 1.0).
1369                 theTrimSize the size of plane.
1370                 theName Object name; when specified, this parameter is used
1371                         for result publication in the study. Otherwise, if automatic
1372                         publication is switched on, default value is used for result name.
1373
1374            Returns: 
1375                 New GEOM.GEOM_Object, containing the created tangent.
1376
1377            Example of usage:
1378                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1379             """
1380             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1381             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1382             self._autoPublish(anObj, theName, "tangent")
1383             return anObj
1384
1385         ## Create a vector with the given components.
1386         #  @param theDX X component of the vector.
1387         #  @param theDY Y component of the vector.
1388         #  @param theDZ Z component of the vector.
1389         #  @param theName Object name; when specified, this parameter is used
1390         #         for result publication in the study. Otherwise, if automatic
1391         #         publication is switched on, default value is used for result name.
1392         #
1393         #  @return New GEOM.GEOM_Object, containing the created vector.
1394         #
1395         #  @ref tui_creation_vector "Example"
1396         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1397             """
1398             Create a vector with the given components.
1399
1400             Parameters:
1401                 theDX X component of the vector.
1402                 theDY Y component of the vector.
1403                 theDZ Z component of the vector.
1404                 theName Object name; when specified, this parameter is used
1405                         for result publication in the study. Otherwise, if automatic
1406                         publication is switched on, default value is used for result name.
1407
1408             Returns:     
1409                 New GEOM.GEOM_Object, containing the created vector.
1410             """
1411             # Example: see GEOM_TestAll.py
1412             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1413             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1414             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1415             anObj.SetParameters(Parameters)
1416             self._autoPublish(anObj, theName, "vector")
1417             return anObj
1418
1419         ## Create a vector between two points.
1420         #  @param thePnt1 Start point for the vector.
1421         #  @param thePnt2 End point for the vector.
1422         #  @param theName Object name; when specified, this parameter is used
1423         #         for result publication in the study. Otherwise, if automatic
1424         #         publication is switched on, default value is used for result name.
1425         #
1426         #  @return New GEOM.GEOM_Object, containing the created vector.
1427         #
1428         #  @ref tui_creation_vector "Example"
1429         def MakeVector(self, thePnt1, thePnt2, theName=None):
1430             """
1431             Create a vector between two points.
1432
1433             Parameters:
1434                 thePnt1 Start point for the vector.
1435                 thePnt2 End point for the vector.
1436                 theName Object name; when specified, this parameter is used
1437                         for result publication in the study. Otherwise, if automatic
1438                         publication is switched on, default value is used for result name.
1439
1440             Returns:        
1441                 New GEOM.GEOM_Object, containing the created vector.
1442             """
1443             # Example: see GEOM_TestAll.py
1444             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1445             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1446             self._autoPublish(anObj, theName, "vector")
1447             return anObj
1448
1449         ## Create a line, passing through the given point
1450         #  and parrallel to the given direction
1451         #  @param thePnt Point. The resulting line will pass through it.
1452         #  @param theDir Direction. The resulting line will be parallel to it.
1453         #  @param theName Object name; when specified, this parameter is used
1454         #         for result publication in the study. Otherwise, if automatic
1455         #         publication is switched on, default value is used for result name.
1456         #
1457         #  @return New GEOM.GEOM_Object, containing the created line.
1458         #
1459         #  @ref tui_creation_line "Example"
1460         def MakeLine(self, thePnt, theDir, theName=None):
1461             """
1462             Create a line, passing through the given point
1463             and parrallel to the given direction
1464
1465             Parameters:
1466                 thePnt Point. The resulting line will pass through it.
1467                 theDir Direction. The resulting line will be parallel to it.
1468                 theName Object name; when specified, this parameter is used
1469                         for result publication in the study. Otherwise, if automatic
1470                         publication is switched on, default value is used for result name.
1471
1472             Returns:
1473                 New GEOM.GEOM_Object, containing the created line.
1474             """
1475             # Example: see GEOM_TestAll.py
1476             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1477             RaiseIfFailed("MakeLine", self.BasicOp)
1478             self._autoPublish(anObj, theName, "line")
1479             return anObj
1480
1481         ## Create a line, passing through the given points
1482         #  @param thePnt1 First of two points, defining the line.
1483         #  @param thePnt2 Second of two points, defining the line.
1484         #  @param theName Object name; when specified, this parameter is used
1485         #         for result publication in the study. Otherwise, if automatic
1486         #         publication is switched on, default value is used for result name.
1487         #
1488         #  @return New GEOM.GEOM_Object, containing the created line.
1489         #
1490         #  @ref tui_creation_line "Example"
1491         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1492             """
1493             Create a line, passing through the given points
1494
1495             Parameters:
1496                 thePnt1 First of two points, defining the line.
1497                 thePnt2 Second of two points, defining the line.
1498                 theName Object name; when specified, this parameter is used
1499                         for result publication in the study. Otherwise, if automatic
1500                         publication is switched on, default value is used for result name.
1501
1502             Returns:
1503                 New GEOM.GEOM_Object, containing the created line.
1504             """
1505             # Example: see GEOM_TestAll.py
1506             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1507             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1508             self._autoPublish(anObj, theName, "line")
1509             return anObj
1510
1511         ## Create a line on two faces intersection.
1512         #  @param theFace1 First of two faces, defining the line.
1513         #  @param theFace2 Second of two faces, defining the line.
1514         #  @param theName Object name; when specified, this parameter is used
1515         #         for result publication in the study. Otherwise, if automatic
1516         #         publication is switched on, default value is used for result name.
1517         #
1518         #  @return New GEOM.GEOM_Object, containing the created line.
1519         #
1520         #  @ref swig_MakeLineTwoFaces "Example"
1521         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1522             """
1523             Create a line on two faces intersection.
1524
1525             Parameters:
1526                 theFace1 First of two faces, defining the line.
1527                 theFace2 Second of two faces, defining the line.
1528                 theName Object name; when specified, this parameter is used
1529                         for result publication in the study. Otherwise, if automatic
1530                         publication is switched on, default value is used for result name.
1531
1532             Returns:
1533                 New GEOM.GEOM_Object, containing the created line.
1534             """
1535             # Example: see GEOM_TestAll.py
1536             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1537             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1538             self._autoPublish(anObj, theName, "line")
1539             return anObj
1540
1541         ## Create a plane, passing through the given point
1542         #  and normal to the given vector.
1543         #  @param thePnt Point, the plane has to pass through.
1544         #  @param theVec Vector, defining the plane normal direction.
1545         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1546         #  @param theName Object name; when specified, this parameter is used
1547         #         for result publication in the study. Otherwise, if automatic
1548         #         publication is switched on, default value is used for result name.
1549         #
1550         #  @return New GEOM.GEOM_Object, containing the created plane.
1551         #
1552         #  @ref tui_creation_plane "Example"
1553         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1554             """
1555             Create a plane, passing through the given point
1556             and normal to the given vector.
1557
1558             Parameters:
1559                 thePnt Point, the plane has to pass through.
1560                 theVec Vector, defining the plane normal direction.
1561                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1562                 theName Object name; when specified, this parameter is used
1563                         for result publication in the study. Otherwise, if automatic
1564                         publication is switched on, default value is used for result name.
1565
1566             Returns:    
1567                 New GEOM.GEOM_Object, containing the created plane.
1568             """
1569             # Example: see GEOM_TestAll.py
1570             theTrimSize, Parameters = ParseParameters(theTrimSize);
1571             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1572             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1573             anObj.SetParameters(Parameters)
1574             self._autoPublish(anObj, theName, "plane")
1575             return anObj
1576
1577         ## Create a plane, passing through the three given points
1578         #  @param thePnt1 First of three points, defining the plane.
1579         #  @param thePnt2 Second of three points, defining the plane.
1580         #  @param thePnt3 Fird of three points, defining the plane.
1581         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1582         #  @param theName Object name; when specified, this parameter is used
1583         #         for result publication in the study. Otherwise, if automatic
1584         #         publication is switched on, default value is used for result name.
1585         #
1586         #  @return New GEOM.GEOM_Object, containing the created plane.
1587         #
1588         #  @ref tui_creation_plane "Example"
1589         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1590             """
1591             Create a plane, passing through the three given points
1592
1593             Parameters:
1594                 thePnt1 First of three points, defining the plane.
1595                 thePnt2 Second of three points, defining the plane.
1596                 thePnt3 Fird of three points, defining the plane.
1597                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1598                 theName Object name; when specified, this parameter is used
1599                         for result publication in the study. Otherwise, if automatic
1600                         publication is switched on, default value is used for result name.
1601
1602             Returns:
1603                 New GEOM.GEOM_Object, containing the created plane.
1604             """
1605             # Example: see GEOM_TestAll.py
1606             theTrimSize, Parameters = ParseParameters(theTrimSize);
1607             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1608             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1609             anObj.SetParameters(Parameters)
1610             self._autoPublish(anObj, theName, "plane")
1611             return anObj
1612
1613         ## Create a plane, similar to the existing one, but with another size of representing face.
1614         #  @param theFace Referenced plane or LCS(Marker).
1615         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1616         #  @param theName Object name; when specified, this parameter is used
1617         #         for result publication in the study. Otherwise, if automatic
1618         #         publication is switched on, default value is used for result name.
1619         #
1620         #  @return New GEOM.GEOM_Object, containing the created plane.
1621         #
1622         #  @ref tui_creation_plane "Example"
1623         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1624             """
1625             Create a plane, similar to the existing one, but with another size of representing face.
1626
1627             Parameters:
1628                 theFace Referenced plane or LCS(Marker).
1629                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1630                 theName Object name; when specified, this parameter is used
1631                         for result publication in the study. Otherwise, if automatic
1632                         publication is switched on, default value is used for result name.
1633
1634             Returns:
1635                 New GEOM.GEOM_Object, containing the created plane.
1636             """
1637             # Example: see GEOM_TestAll.py
1638             theTrimSize, Parameters = ParseParameters(theTrimSize);
1639             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1640             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1641             anObj.SetParameters(Parameters)
1642             self._autoPublish(anObj, theName, "plane")
1643             return anObj
1644
1645         ## Create a plane, passing through the 2 vectors
1646         #  with center in a start point of the first vector.
1647         #  @param theVec1 Vector, defining center point and plane direction.
1648         #  @param theVec2 Vector, defining the plane normal direction.
1649         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1650         #  @param theName Object name; when specified, this parameter is used
1651         #         for result publication in the study. Otherwise, if automatic
1652         #         publication is switched on, default value is used for result name.
1653         #
1654         #  @return New GEOM.GEOM_Object, containing the created plane.
1655         #
1656         #  @ref tui_creation_plane "Example"
1657         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1658             """
1659             Create a plane, passing through the 2 vectors
1660             with center in a start point of the first vector.
1661
1662             Parameters:
1663                 theVec1 Vector, defining center point and plane direction.
1664                 theVec2 Vector, defining the plane normal direction.
1665                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1666                 theName Object name; when specified, this parameter is used
1667                         for result publication in the study. Otherwise, if automatic
1668                         publication is switched on, default value is used for result name.
1669
1670             Returns: 
1671                 New GEOM.GEOM_Object, containing the created plane.
1672             """
1673             # Example: see GEOM_TestAll.py
1674             theTrimSize, Parameters = ParseParameters(theTrimSize);
1675             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1676             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1677             anObj.SetParameters(Parameters)
1678             self._autoPublish(anObj, theName, "plane")
1679             return anObj
1680
1681         ## Create a plane, based on a Local coordinate system.
1682         #  @param theLCS  coordinate system, defining plane.
1683         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1684         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1685         #  @param theName Object name; when specified, this parameter is used
1686         #         for result publication in the study. Otherwise, if automatic
1687         #         publication is switched on, default value is used for result name.
1688         #
1689         #  @return New GEOM.GEOM_Object, containing the created plane.
1690         #
1691         #  @ref tui_creation_plane "Example"
1692         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1693             """
1694             Create a plane, based on a Local coordinate system.
1695
1696            Parameters: 
1697                 theLCS  coordinate system, defining plane.
1698                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1699                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1700                 theName Object name; when specified, this parameter is used
1701                         for result publication in the study. Otherwise, if automatic
1702                         publication is switched on, default value is used for result name.
1703
1704             Returns: 
1705                 New GEOM.GEOM_Object, containing the created plane.
1706             """
1707             # Example: see GEOM_TestAll.py
1708             theTrimSize, Parameters = ParseParameters(theTrimSize);
1709             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1710             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1711             anObj.SetParameters(Parameters)
1712             self._autoPublish(anObj, theName, "plane")
1713             return anObj
1714
1715         ## Create a local coordinate system.
1716         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1717         #  @param XDX,XDY,XDZ Three components of OX direction
1718         #  @param YDX,YDY,YDZ Three components of OY direction
1719         #  @param theName Object name; when specified, this parameter is used
1720         #         for result publication in the study. Otherwise, if automatic
1721         #         publication is switched on, default value is used for result name.
1722         #
1723         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1724         #
1725         #  @ref swig_MakeMarker "Example"
1726         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1727             """
1728             Create a local coordinate system.
1729
1730             Parameters: 
1731                 OX,OY,OZ Three coordinates of coordinate system origin.
1732                 XDX,XDY,XDZ Three components of OX direction
1733                 YDX,YDY,YDZ Three components of OY direction
1734                 theName Object name; when specified, this parameter is used
1735                         for result publication in the study. Otherwise, if automatic
1736                         publication is switched on, default value is used for result name.
1737
1738             Returns: 
1739                 New GEOM.GEOM_Object, containing the created coordinate system.
1740             """
1741             # Example: see GEOM_TestAll.py
1742             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1743             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1744             RaiseIfFailed("MakeMarker", self.BasicOp)
1745             anObj.SetParameters(Parameters)
1746             self._autoPublish(anObj, theName, "lcs")
1747             return anObj
1748
1749         ## Create a local coordinate system from shape.
1750         #  @param theShape The initial shape to detect the coordinate system.
1751         #  @param theName Object name; when specified, this parameter is used
1752         #         for result publication in the study. Otherwise, if automatic
1753         #         publication is switched on, default value is used for result name.
1754         #
1755         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1756         #
1757         #  @ref tui_creation_lcs "Example"
1758         def MakeMarkerFromShape(self, theShape, theName=None):
1759             """
1760             Create a local coordinate system from shape.
1761
1762             Parameters:
1763                 theShape The initial shape to detect the coordinate system.
1764                 theName Object name; when specified, this parameter is used
1765                         for result publication in the study. Otherwise, if automatic
1766                         publication is switched on, default value is used for result name.
1767                 
1768             Returns: 
1769                 New GEOM.GEOM_Object, containing the created coordinate system.
1770             """
1771             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1772             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1773             self._autoPublish(anObj, theName, "lcs")
1774             return anObj
1775
1776         ## Create a local coordinate system from point and two vectors.
1777         #  @param theOrigin Point of coordinate system origin.
1778         #  @param theXVec Vector of X direction
1779         #  @param theYVec Vector of Y direction
1780         #  @param theName Object name; when specified, this parameter is used
1781         #         for result publication in the study. Otherwise, if automatic
1782         #         publication is switched on, default value is used for result name.
1783         #
1784         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1785         #
1786         #  @ref tui_creation_lcs "Example"
1787         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1788             """
1789             Create a local coordinate system from point and two vectors.
1790
1791             Parameters:
1792                 theOrigin Point of coordinate system origin.
1793                 theXVec Vector of X direction
1794                 theYVec Vector of Y direction
1795                 theName Object name; when specified, this parameter is used
1796                         for result publication in the study. Otherwise, if automatic
1797                         publication is switched on, default value is used for result name.
1798
1799             Returns: 
1800                 New GEOM.GEOM_Object, containing the created coordinate system.
1801
1802             """
1803             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1804             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1805             self._autoPublish(anObj, theName, "lcs")
1806             return anObj
1807
1808         # end of l3_basic_go
1809         ## @}
1810
1811         ## @addtogroup l4_curves
1812         ## @{
1813
1814         ##  Create an arc of circle, passing through three given points.
1815         #  @param thePnt1 Start point of the arc.
1816         #  @param thePnt2 Middle point of the arc.
1817         #  @param thePnt3 End point of the arc.
1818         #  @param theName Object name; when specified, this parameter is used
1819         #         for result publication in the study. Otherwise, if automatic
1820         #         publication is switched on, default value is used for result name.
1821         #
1822         #  @return New GEOM.GEOM_Object, containing the created arc.
1823         #
1824         #  @ref swig_MakeArc "Example"
1825         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1826             """
1827             Create an arc of circle, passing through three given points.
1828
1829             Parameters:
1830                 thePnt1 Start point of the arc.
1831                 thePnt2 Middle point of the arc.
1832                 thePnt3 End point of the arc.
1833                 theName Object name; when specified, this parameter is used
1834                         for result publication in the study. Otherwise, if automatic
1835                         publication is switched on, default value is used for result name.
1836
1837             Returns: 
1838                 New GEOM.GEOM_Object, containing the created arc.
1839             """
1840             # Example: see GEOM_TestAll.py
1841             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1842             RaiseIfFailed("MakeArc", self.CurvesOp)
1843             self._autoPublish(anObj, theName, "arc")
1844             return anObj
1845
1846         ##  Create an arc of circle from a center and 2 points.
1847         #  @param thePnt1 Center of the arc
1848         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1849         #  @param thePnt3 End point of the arc (Gives also a direction)
1850         #  @param theSense Orientation of the arc
1851         #  @param theName Object name; when specified, this parameter is used
1852         #         for result publication in the study. Otherwise, if automatic
1853         #         publication is switched on, default value is used for result name.
1854         #
1855         #  @return New GEOM.GEOM_Object, containing the created arc.
1856         #
1857         #  @ref swig_MakeArc "Example"
1858         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1859             """
1860             Create an arc of circle from a center and 2 points.
1861
1862             Parameters:
1863                 thePnt1 Center of the arc
1864                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1865                 thePnt3 End point of the arc (Gives also a direction)
1866                 theSense Orientation of the arc
1867                 theName Object name; when specified, this parameter is used
1868                         for result publication in the study. Otherwise, if automatic
1869                         publication is switched on, default value is used for result name.
1870
1871             Returns:
1872                 New GEOM.GEOM_Object, containing the created arc.
1873             """
1874             # Example: see GEOM_TestAll.py
1875             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1876             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1877             self._autoPublish(anObj, theName, "arc")
1878             return anObj
1879
1880         ##  Create an arc of ellipse, of center and two points.
1881         #  @param theCenter Center of the arc.
1882         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1883         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1884         #  @param theName Object name; when specified, this parameter is used
1885         #         for result publication in the study. Otherwise, if automatic
1886         #         publication is switched on, default value is used for result name.
1887         #
1888         #  @return New GEOM.GEOM_Object, containing the created arc.
1889         #
1890         #  @ref swig_MakeArc "Example"
1891         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1892             """
1893             Create an arc of ellipse, of center and two points.
1894
1895             Parameters:
1896                 theCenter Center of the arc.
1897                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1898                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1899                 theName Object name; when specified, this parameter is used
1900                         for result publication in the study. Otherwise, if automatic
1901                         publication is switched on, default value is used for result name.
1902
1903             Returns:
1904                 New GEOM.GEOM_Object, containing the created arc.
1905             """
1906             # Example: see GEOM_TestAll.py
1907             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1908             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1909             self._autoPublish(anObj, theName, "arc")
1910             return anObj
1911
1912         ## Create a circle with given center, normal vector and radius.
1913         #  @param thePnt Circle center.
1914         #  @param theVec Vector, normal to the plane of the circle.
1915         #  @param theR Circle radius.
1916         #  @param theName Object name; when specified, this parameter is used
1917         #         for result publication in the study. Otherwise, if automatic
1918         #         publication is switched on, default value is used for result name.
1919         #
1920         #  @return New GEOM.GEOM_Object, containing the created circle.
1921         #
1922         #  @ref tui_creation_circle "Example"
1923         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1924             """
1925             Create a circle with given center, normal vector and radius.
1926
1927             Parameters:
1928                 thePnt Circle center.
1929                 theVec Vector, normal to the plane of the circle.
1930                 theR Circle radius.
1931                 theName Object name; when specified, this parameter is used
1932                         for result publication in the study. Otherwise, if automatic
1933                         publication is switched on, default value is used for result name.
1934
1935             Returns:
1936                 New GEOM.GEOM_Object, containing the created circle.
1937             """
1938             # Example: see GEOM_TestAll.py
1939             theR, Parameters = ParseParameters(theR)
1940             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1941             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1942             anObj.SetParameters(Parameters)
1943             self._autoPublish(anObj, theName, "circle")
1944             return anObj
1945
1946         ## Create a circle with given radius.
1947         #  Center of the circle will be in the origin of global
1948         #  coordinate system and normal vector will be codirected with Z axis
1949         #  @param theR Circle radius.
1950         #  @param theName Object name; when specified, this parameter is used
1951         #         for result publication in the study. Otherwise, if automatic
1952         #         publication is switched on, default value is used for result name.
1953         #
1954         #  @return New GEOM.GEOM_Object, containing the created circle.
1955         def MakeCircleR(self, theR, theName=None):
1956             """
1957             Create a circle with given radius.
1958             Center of the circle will be in the origin of global
1959             coordinate system and normal vector will be codirected with Z axis
1960
1961             Parameters:
1962                 theR Circle radius.
1963                 theName Object name; when specified, this parameter is used
1964                         for result publication in the study. Otherwise, if automatic
1965                         publication is switched on, default value is used for result name.
1966
1967             Returns:
1968                 New GEOM.GEOM_Object, containing the created circle.
1969             """
1970             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1971             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1972             self._autoPublish(anObj, theName, "circle")
1973             return anObj
1974
1975         ## Create a circle, passing through three given points
1976         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1977         #  @param theName Object name; when specified, this parameter is used
1978         #         for result publication in the study. Otherwise, if automatic
1979         #         publication is switched on, default value is used for result name.
1980         #
1981         #  @return New GEOM.GEOM_Object, containing the created circle.
1982         #
1983         #  @ref tui_creation_circle "Example"
1984         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1985             """
1986             Create a circle, passing through three given points
1987
1988             Parameters:
1989                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1990                 theName Object name; when specified, this parameter is used
1991                         for result publication in the study. Otherwise, if automatic
1992                         publication is switched on, default value is used for result name.
1993
1994             Returns:
1995                 New GEOM.GEOM_Object, containing the created circle.
1996             """
1997             # Example: see GEOM_TestAll.py
1998             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
1999             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2000             self._autoPublish(anObj, theName, "circle")
2001             return anObj
2002
2003         ## Create a circle, with given point1 as center,
2004         #  passing through the point2 as radius and laying in the plane,
2005         #  defined by all three given points.
2006         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2007         #  @param theName Object name; when specified, this parameter is used
2008         #         for result publication in the study. Otherwise, if automatic
2009         #         publication is switched on, default value is used for result name.
2010         #
2011         #  @return New GEOM.GEOM_Object, containing the created circle.
2012         #
2013         #  @ref swig_MakeCircle "Example"
2014         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2015             """
2016             Create a circle, with given point1 as center,
2017             passing through the point2 as radius and laying in the plane,
2018             defined by all three given points.
2019
2020             Parameters:
2021                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2022                 theName Object name; when specified, this parameter is used
2023                         for result publication in the study. Otherwise, if automatic
2024                         publication is switched on, default value is used for result name.
2025
2026             Returns:
2027                 New GEOM.GEOM_Object, containing the created circle.
2028             """
2029             # Example: see GEOM_example6.py
2030             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2031             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2032             self._autoPublish(anObj, theName, "circle")
2033             return anObj
2034
2035         ## Create an ellipse with given center, normal vector and radiuses.
2036         #  @param thePnt Ellipse center.
2037         #  @param theVec Vector, normal to the plane of the ellipse.
2038         #  @param theRMajor Major ellipse radius.
2039         #  @param theRMinor Minor ellipse radius.
2040         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2041         #  @param theName Object name; when specified, this parameter is used
2042         #         for result publication in the study. Otherwise, if automatic
2043         #         publication is switched on, default value is used for result name.
2044         #
2045         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2046         #
2047         #  @ref tui_creation_ellipse "Example"
2048         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2049             """
2050             Create an ellipse with given center, normal vector and radiuses.
2051
2052             Parameters:
2053                 thePnt Ellipse center.
2054                 theVec Vector, normal to the plane of the ellipse.
2055                 theRMajor Major ellipse radius.
2056                 theRMinor Minor ellipse radius.
2057                 theVecMaj Vector, direction of the ellipse's main axis.
2058                 theName Object name; when specified, this parameter is used
2059                         for result publication in the study. Otherwise, if automatic
2060                         publication is switched on, default value is used for result name.
2061
2062             Returns:    
2063                 New GEOM.GEOM_Object, containing the created ellipse.
2064             """
2065             # Example: see GEOM_TestAll.py
2066             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2067             if theVecMaj is not None:
2068                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2069             else:
2070                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2071                 pass
2072             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2073             anObj.SetParameters(Parameters)
2074             self._autoPublish(anObj, theName, "ellipse")
2075             return anObj
2076
2077         ## Create an ellipse with given radiuses.
2078         #  Center of the ellipse will be in the origin of global
2079         #  coordinate system and normal vector will be codirected with Z axis
2080         #  @param theRMajor Major ellipse radius.
2081         #  @param theRMinor Minor ellipse radius.
2082         #  @param theName Object name; when specified, this parameter is used
2083         #         for result publication in the study. Otherwise, if automatic
2084         #         publication is switched on, default value is used for result name.
2085         #
2086         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2087         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2088             """
2089             Create an ellipse with given radiuses.
2090             Center of the ellipse will be in the origin of global
2091             coordinate system and normal vector will be codirected with Z axis
2092
2093             Parameters:
2094                 theRMajor Major ellipse radius.
2095                 theRMinor Minor ellipse radius.
2096                 theName Object name; when specified, this parameter is used
2097                         for result publication in the study. Otherwise, if automatic
2098                         publication is switched on, default value is used for result name.
2099
2100             Returns:
2101             New GEOM.GEOM_Object, containing the created ellipse.
2102             """
2103             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2104             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2105             self._autoPublish(anObj, theName, "ellipse")
2106             return anObj
2107
2108         ## Create a polyline on the set of points.
2109         #  @param thePoints Sequence of points for the polyline.
2110         #  @param theIsClosed If True, build a closed wire.
2111         #  @param theName Object name; when specified, this parameter is used
2112         #         for result publication in the study. Otherwise, if automatic
2113         #         publication is switched on, default value is used for result name.
2114         #
2115         #  @return New GEOM.GEOM_Object, containing the created polyline.
2116         #
2117         #  @ref tui_creation_curve "Example"
2118         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2119             """
2120             Create a polyline on the set of points.
2121
2122             Parameters:
2123                 thePoints Sequence of points for the polyline.
2124                 theIsClosed If True, build a closed wire.
2125                 theName Object name; when specified, this parameter is used
2126                         for result publication in the study. Otherwise, if automatic
2127                         publication is switched on, default value is used for result name.
2128
2129             Returns:
2130                 New GEOM.GEOM_Object, containing the created polyline.
2131             """
2132             # Example: see GEOM_TestAll.py
2133             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2134             RaiseIfFailed("MakePolyline", self.CurvesOp)
2135             self._autoPublish(anObj, theName, "polyline")
2136             return anObj
2137
2138         ## Create bezier curve on the set of points.
2139         #  @param thePoints Sequence of points for the bezier curve.
2140         #  @param theIsClosed If True, build a closed curve.
2141         #  @param theName Object name; when specified, this parameter is used
2142         #         for result publication in the study. Otherwise, if automatic
2143         #         publication is switched on, default value is used for result name.
2144         #
2145         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2146         #
2147         #  @ref tui_creation_curve "Example"
2148         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2149             """
2150             Create bezier curve on the set of points.
2151
2152             Parameters:
2153                 thePoints Sequence of points for the bezier curve.
2154                 theIsClosed If True, build a closed curve.
2155                 theName Object name; when specified, this parameter is used
2156                         for result publication in the study. Otherwise, if automatic
2157                         publication is switched on, default value is used for result name.
2158
2159             Returns:
2160                 New GEOM.GEOM_Object, containing the created bezier curve.
2161             """
2162             # Example: see GEOM_TestAll.py
2163             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2164             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2165             self._autoPublish(anObj, theName, "bezier")
2166             return anObj
2167
2168         ## Create B-Spline curve on the set of points.
2169         #  @param thePoints Sequence of points for the B-Spline curve.
2170         #  @param theIsClosed If True, build a closed curve.
2171         #  @param theDoReordering If TRUE, the algo does not follow the order of
2172         #                         \a thePoints but searches for the closest vertex.
2173         #  @param theName Object name; when specified, this parameter is used
2174         #         for result publication in the study. Otherwise, if automatic
2175         #         publication is switched on, default value is used for result name.
2176         #
2177         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2178         #
2179         #  @ref tui_creation_curve "Example"
2180         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2181             """
2182             Create B-Spline curve on the set of points.
2183
2184             Parameters:
2185                 thePoints Sequence of points for the B-Spline curve.
2186                 theIsClosed If True, build a closed curve.
2187                 theDoReordering If True, the algo does not follow the order of
2188                                 thePoints but searches for the closest vertex.
2189                 theName Object name; when specified, this parameter is used
2190                         for result publication in the study. Otherwise, if automatic
2191                         publication is switched on, default value is used for result name.
2192
2193             Returns:                     
2194                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2195             """
2196             # Example: see GEOM_TestAll.py
2197             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2198             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2199             self._autoPublish(anObj, theName, "bspline")
2200             return anObj
2201
2202         ## Create B-Spline curve on the set of points.
2203         #  @param thePoints Sequence of points for the B-Spline curve.
2204         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2205         #  @param theLastVec Vector object, defining the curve direction at its last point.
2206         #  @param theName Object name; when specified, this parameter is used
2207         #         for result publication in the study. Otherwise, if automatic
2208         #         publication is switched on, default value is used for result name.
2209         #
2210         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2211         #
2212         #  @ref tui_creation_curve "Example"
2213         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2214             """
2215             Create B-Spline curve on the set of points.
2216
2217             Parameters:
2218                 thePoints Sequence of points for the B-Spline curve.
2219                 theFirstVec Vector object, defining the curve direction at its first point.
2220                 theLastVec Vector object, defining the curve direction at its last point.
2221                 theName Object name; when specified, this parameter is used
2222                         for result publication in the study. Otherwise, if automatic
2223                         publication is switched on, default value is used for result name.
2224
2225             Returns:                     
2226                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2227             """
2228             # Example: see GEOM_TestAll.py
2229             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2230             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2231             self._autoPublish(anObj, theName, "bspline")
2232             return anObj
2233
2234         ## Creates a curve using the parametric definition of the basic points.
2235         #  @param thexExpr parametric equation of the coordinates X.
2236         #  @param theyExpr parametric equation of the coordinates Y.
2237         #  @param thezExpr parametric equation of the coordinates Z.
2238         #  @param theParamMin the minimal value of the parameter.
2239         #  @param theParamMax the maximum value of the parameter.
2240         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2241         #  @param theCurveType the type of the curve.
2242         #  @param theNewMethod flag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug.
2243         #  @param theName Object name; when specified, this parameter is used
2244         #         for result publication in the study. Otherwise, if automatic
2245         #         publication is switched on, default value is used for result name.
2246         #
2247         #  @return New GEOM.GEOM_Object, containing the created curve.
2248         #
2249         #  @ref tui_creation_curve "Example"
2250         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2251                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2252             """
2253             Creates a curve using the parametric definition of the basic points.
2254
2255             Parameters:
2256                 thexExpr parametric equation of the coordinates X.
2257                 theyExpr parametric equation of the coordinates Y.
2258                 thezExpr parametric equation of the coordinates Z.
2259                 theParamMin the minimal value of the parameter.
2260                 theParamMax the maximum value of the parameter.
2261                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2262                 theCurveType the type of the curve.
2263                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2264                              method is used which can lead to a bug.
2265                 theName Object name; when specified, this parameter is used
2266                         for result publication in the study. Otherwise, if automatic
2267                         publication is switched on, default value is used for result name.
2268
2269             Returns:
2270                 New GEOM.GEOM_Object, containing the created curve.
2271             """
2272             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2273             if theNewMethod:
2274               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2275             else:
2276               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2277             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2278             anObj.SetParameters(Parameters)
2279             self._autoPublish(anObj, theName, "curve")
2280             return anObj
2281
2282         # end of l4_curves
2283         ## @}
2284
2285         ## @addtogroup l3_sketcher
2286         ## @{
2287
2288         ## Create a sketcher (wire or face), following the textual description,
2289         #  passed through <VAR>theCommand</VAR> argument. \n
2290         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2291         #  Format of the description string have to be the following:
2292         #
2293         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2294         #
2295         #  Where:
2296         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2297         #  - CMD is one of
2298         #     - "R angle" : Set the direction by angle
2299         #     - "D dx dy" : Set the direction by DX & DY
2300         #     .
2301         #       \n
2302         #     - "TT x y" : Create segment by point at X & Y
2303         #     - "T dx dy" : Create segment by point with DX & DY
2304         #     - "L length" : Create segment by direction & Length
2305         #     - "IX x" : Create segment by direction & Intersect. X
2306         #     - "IY y" : Create segment by direction & Intersect. Y
2307         #     .
2308         #       \n
2309         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2310         #     - "AA x y": Create arc by point at X & Y
2311         #     - "A dx dy" : Create arc by point with DX & DY
2312         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2313         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2314         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2315         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2316         #     .
2317         #       \n
2318         #     - "WW" : Close Wire (to finish)
2319         #     - "WF" : Close Wire and build face (to finish)
2320         #     .
2321         #        \n
2322         #  - Flag1 (= reverse) is 0 or 2 ...
2323         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2324         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2325         #     .
2326         #        \n
2327         #  - Flag2 (= control tolerance) is 0 or 1 ...
2328         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2329         #     - if 1 the wire is built only if the end point is on the arc
2330         #       with a tolerance of 10^-7 on the distance else the creation fails
2331         #
2332         #  @param theCommand String, defining the sketcher in local
2333         #                    coordinates of the working plane.
2334         #  @param theWorkingPlane Nine double values, defining origin,
2335         #                         OZ and OX directions of the working plane.
2336         #  @param theName Object name; when specified, this parameter is used
2337         #         for result publication in the study. Otherwise, if automatic
2338         #         publication is switched on, default value is used for result name.
2339         #
2340         #  @return New GEOM.GEOM_Object, containing the created wire.
2341         #
2342         #  @ref tui_sketcher_page "Example"
2343         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2344             """
2345             Create a sketcher (wire or face), following the textual description, passed
2346             through theCommand argument.
2347             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2348             Format of the description string have to be the following:
2349                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2350             Where:
2351             - x1, y1 are coordinates of the first sketcher point (zero by default),
2352             - CMD is one of
2353                - "R angle" : Set the direction by angle
2354                - "D dx dy" : Set the direction by DX & DY
2355                
2356                - "TT x y" : Create segment by point at X & Y
2357                - "T dx dy" : Create segment by point with DX & DY
2358                - "L length" : Create segment by direction & Length
2359                - "IX x" : Create segment by direction & Intersect. X
2360                - "IY y" : Create segment by direction & Intersect. Y
2361
2362                - "C radius length" : Create arc by direction, radius and length(in degree)
2363                - "AA x y": Create arc by point at X & Y
2364                - "A dx dy" : Create arc by point with DX & DY
2365                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2366                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2367                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2368                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2369
2370                - "WW" : Close Wire (to finish)
2371                - "WF" : Close Wire and build face (to finish)
2372             
2373             - Flag1 (= reverse) is 0 or 2 ...
2374                - if 0 the drawn arc is the one of lower angle (< Pi)
2375                - if 2 the drawn arc ius the one of greater angle (> Pi)
2376         
2377             - Flag2 (= control tolerance) is 0 or 1 ...
2378                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2379                - if 1 the wire is built only if the end point is on the arc
2380                  with a tolerance of 10^-7 on the distance else the creation fails
2381
2382             Parameters:
2383                 theCommand String, defining the sketcher in local
2384                            coordinates of the working plane.
2385                 theWorkingPlane Nine double values, defining origin,
2386                                 OZ and OX directions of the working plane.
2387                 theName Object name; when specified, this parameter is used
2388                         for result publication in the study. Otherwise, if automatic
2389                         publication is switched on, default value is used for result name.
2390
2391             Returns:
2392                 New GEOM.GEOM_Object, containing the created wire.
2393             """
2394             # Example: see GEOM_TestAll.py
2395             theCommand,Parameters = ParseSketcherCommand(theCommand)
2396             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2397             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2398             anObj.SetParameters(Parameters)
2399             self._autoPublish(anObj, theName, "wire")
2400             return anObj
2401
2402         ## Create a sketcher (wire or face), following the textual description,
2403         #  passed through <VAR>theCommand</VAR> argument. \n
2404         #  For format of the description string see MakeSketcher() method.\n
2405         #  @param theCommand String, defining the sketcher in local
2406         #                    coordinates of the working plane.
2407         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2408         #  @param theName Object name; when specified, this parameter is used
2409         #         for result publication in the study. Otherwise, if automatic
2410         #         publication is switched on, default value is used for result name.
2411         #
2412         #  @return New GEOM.GEOM_Object, containing the created wire.
2413         #
2414         #  @ref tui_sketcher_page "Example"
2415         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2416             """
2417             Create a sketcher (wire or face), following the textual description,
2418             passed through theCommand argument.
2419             For format of the description string see geompy.MakeSketcher() method.
2420
2421             Parameters:
2422                 theCommand String, defining the sketcher in local
2423                            coordinates of the working plane.
2424                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2425                 theName Object name; when specified, this parameter is used
2426                         for result publication in the study. Otherwise, if automatic
2427                         publication is switched on, default value is used for result name.
2428
2429             Returns:
2430                 New GEOM.GEOM_Object, containing the created wire.
2431             """
2432             theCommand,Parameters = ParseSketcherCommand(theCommand)
2433             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2434             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2435             anObj.SetParameters(Parameters)
2436             self._autoPublish(anObj, theName, "wire")
2437             return anObj
2438
2439         ## Obtain a 2D sketcher interface
2440         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2441         def Sketcher2D (self):
2442             """
2443             Obtain a 2D sketcher interface.
2444
2445             Example of usage:
2446                sk = geompy.Sketcher2D()
2447                sk.addPoint(20, 20)
2448                sk.addSegmentRelative(15, 70)
2449                sk.addSegmentPerpY(50)
2450                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2451                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2452                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2453                sk.close()
2454                Sketch_1 = sk.wire(geomObj_1)
2455             """
2456             sk = Sketcher2D (self)
2457             return sk
2458         
2459         ## Create a sketcher wire, following the numerical description,
2460         #  passed through <VAR>theCoordinates</VAR> argument. \n
2461         #  @param theCoordinates double values, defining points to create a wire,
2462         #                                                      passing from it.
2463         #  @param theName Object name; when specified, this parameter is used
2464         #         for result publication in the study. Otherwise, if automatic
2465         #         publication is switched on, default value is used for result name.
2466         #
2467         #  @return New GEOM.GEOM_Object, containing the created wire.
2468         #
2469         #  @ref tui_3dsketcher_page "Example"
2470         def Make3DSketcher(self, theCoordinates, theName=None):
2471             """
2472             Create a sketcher wire, following the numerical description,
2473             passed through theCoordinates argument.
2474
2475             Parameters:
2476                 theCoordinates double values, defining points to create a wire,
2477                                passing from it.
2478                 theName Object name; when specified, this parameter is used
2479                         for result publication in the study. Otherwise, if automatic
2480                         publication is switched on, default value is used for result name.
2481
2482             Returns:
2483                 New GEOM_Object, containing the created wire.
2484             """
2485             theCoordinates,Parameters = ParseParameters(theCoordinates)
2486             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2487             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2488             anObj.SetParameters(Parameters)
2489             self._autoPublish(anObj, theName, "wire")
2490             return anObj
2491
2492         ## Obtain a 3D sketcher interface
2493         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2494         #
2495         #  @ref tui_3dsketcher_page "Example"
2496         def Sketcher3D (self):
2497             """
2498             Obtain a 3D sketcher interface.
2499
2500             Example of usage:
2501                 sk = geompy.Sketcher3D()
2502                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2503                 sk.addPointsRelative(0, 0, 130)
2504                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2505                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2506                 sk.close()
2507                 a3D_Sketcher_1 = sk.wire()
2508             """
2509             sk = Sketcher3D (self)
2510             return sk
2511
2512         # end of l3_sketcher
2513         ## @}
2514
2515         ## @addtogroup l3_3d_primitives
2516         ## @{
2517
2518         ## Create a box by coordinates of two opposite vertices.
2519         #
2520         #  @param x1,y1,z1 double values, defining first point it.
2521         #  @param x2,y2,z2 double values, defining first point it.
2522         #  @param theName Object name; when specified, this parameter is used
2523         #         for result publication in the study. Otherwise, if automatic
2524         #         publication is switched on, default value is used for result name.
2525         #
2526         #  @return New GEOM.GEOM_Object, containing the created box.
2527         #
2528         #  @ref tui_creation_box "Example"
2529         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2530             """
2531             Create a box by coordinates of two opposite vertices.
2532             
2533             Parameters:
2534                 x1,y1,z1 double values, defining first point.
2535                 x2,y2,z2 double values, defining second point.
2536                 theName Object name; when specified, this parameter is used
2537                         for result publication in the study. Otherwise, if automatic
2538                         publication is switched on, default value is used for result name.
2539                 
2540             Returns:
2541                 New GEOM.GEOM_Object, containing the created box.
2542             """
2543             # Example: see GEOM_TestAll.py
2544             pnt1 = self.MakeVertex(x1,y1,z1)
2545             pnt2 = self.MakeVertex(x2,y2,z2)
2546             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2547             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2548
2549         ## Create a box with specified dimensions along the coordinate axes
2550         #  and with edges, parallel to the coordinate axes.
2551         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2552         #  @param theDX Length of Box edges, parallel to OX axis.
2553         #  @param theDY Length of Box edges, parallel to OY axis.
2554         #  @param theDZ Length of Box edges, parallel to OZ axis.
2555         #  @param theName Object name; when specified, this parameter is used
2556         #         for result publication in the study. Otherwise, if automatic
2557         #         publication is switched on, default value is used for result name.
2558         #
2559         #  @return New GEOM.GEOM_Object, containing the created box.
2560         #
2561         #  @ref tui_creation_box "Example"
2562         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2563             """
2564             Create a box with specified dimensions along the coordinate axes
2565             and with edges, parallel to the coordinate axes.
2566             Center of the box will be at point (DX/2, DY/2, DZ/2).
2567
2568             Parameters:
2569                 theDX Length of Box edges, parallel to OX axis.
2570                 theDY Length of Box edges, parallel to OY axis.
2571                 theDZ Length of Box edges, parallel to OZ axis.
2572                 theName Object name; when specified, this parameter is used
2573                         for result publication in the study. Otherwise, if automatic
2574                         publication is switched on, default value is used for result name.
2575
2576             Returns:   
2577                 New GEOM.GEOM_Object, containing the created box.
2578             """
2579             # Example: see GEOM_TestAll.py
2580             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2581             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2582             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2583             anObj.SetParameters(Parameters)
2584             self._autoPublish(anObj, theName, "box")
2585             return anObj
2586
2587         ## Create a box with two specified opposite vertices,
2588         #  and with edges, parallel to the coordinate axes
2589         #  @param thePnt1 First of two opposite vertices.
2590         #  @param thePnt2 Second of two opposite vertices.
2591         #  @param theName Object name; when specified, this parameter is used
2592         #         for result publication in the study. Otherwise, if automatic
2593         #         publication is switched on, default value is used for result name.
2594         #
2595         #  @return New GEOM.GEOM_Object, containing the created box.
2596         #
2597         #  @ref tui_creation_box "Example"
2598         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2599             """
2600             Create a box with two specified opposite vertices,
2601             and with edges, parallel to the coordinate axes
2602
2603             Parameters:
2604                 thePnt1 First of two opposite vertices.
2605                 thePnt2 Second of two opposite vertices.
2606                 theName Object name; when specified, this parameter is used
2607                         for result publication in the study. Otherwise, if automatic
2608                         publication is switched on, default value is used for result name.
2609
2610             Returns:
2611                 New GEOM.GEOM_Object, containing the created box.
2612             """
2613             # Example: see GEOM_TestAll.py
2614             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2615             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2616             self._autoPublish(anObj, theName, "box")
2617             return anObj
2618
2619         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2620         #  @param theH height of Face.
2621         #  @param theW width of Face.
2622         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2623         #  @param theName Object name; when specified, this parameter is used
2624         #         for result publication in the study. Otherwise, if automatic
2625         #         publication is switched on, default value is used for result name.
2626         #
2627         #  @return New GEOM.GEOM_Object, containing the created face.
2628         #
2629         #  @ref tui_creation_face "Example"
2630         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2631             """
2632             Create a face with specified dimensions with edges parallel to coordinate axes.
2633
2634             Parameters:
2635                 theH height of Face.
2636                 theW width of Face.
2637                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2638                 theName Object name; when specified, this parameter is used
2639                         for result publication in the study. Otherwise, if automatic
2640                         publication is switched on, default value is used for result name.
2641
2642             Returns:
2643                 New GEOM.GEOM_Object, containing the created face.
2644             """
2645             # Example: see GEOM_TestAll.py
2646             theH,theW,Parameters = ParseParameters(theH, theW)
2647             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2648             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2649             anObj.SetParameters(Parameters)
2650             self._autoPublish(anObj, theName, "rectangle")
2651             return anObj
2652
2653         ## Create a face from another plane and two sizes,
2654         #  vertical size and horisontal size.
2655         #  @param theObj   Normale vector to the creating face or
2656         #  the face object.
2657         #  @param theH     Height (vertical size).
2658         #  @param theW     Width (horisontal size).
2659         #  @param theName Object name; when specified, this parameter is used
2660         #         for result publication in the study. Otherwise, if automatic
2661         #         publication is switched on, default value is used for result name.
2662         #
2663         #  @return New GEOM.GEOM_Object, containing the created face.
2664         #
2665         #  @ref tui_creation_face "Example"
2666         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2667             """
2668             Create a face from another plane and two sizes,
2669             vertical size and horisontal size.
2670
2671             Parameters:
2672                 theObj   Normale vector to the creating face or
2673                          the face object.
2674                 theH     Height (vertical size).
2675                 theW     Width (horisontal size).
2676                 theName Object name; when specified, this parameter is used
2677                         for result publication in the study. Otherwise, if automatic
2678                         publication is switched on, default value is used for result name.
2679
2680             Returns:
2681                 New GEOM_Object, containing the created face.
2682             """
2683             # Example: see GEOM_TestAll.py
2684             theH,theW,Parameters = ParseParameters(theH, theW)
2685             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2686             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2687             anObj.SetParameters(Parameters)
2688             self._autoPublish(anObj, theName, "rectangle")
2689             return anObj
2690
2691         ## Create a disk with given center, normal vector and radius.
2692         #  @param thePnt Disk center.
2693         #  @param theVec Vector, normal to the plane of the disk.
2694         #  @param theR Disk radius.
2695         #  @param theName Object name; when specified, this parameter is used
2696         #         for result publication in the study. Otherwise, if automatic
2697         #         publication is switched on, default value is used for result name.
2698         #
2699         #  @return New GEOM.GEOM_Object, containing the created disk.
2700         #
2701         #  @ref tui_creation_disk "Example"
2702         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2703             """
2704             Create a disk with given center, normal vector and radius.
2705
2706             Parameters:
2707                 thePnt Disk center.
2708                 theVec Vector, normal to the plane of the disk.
2709                 theR Disk radius.
2710                 theName Object name; when specified, this parameter is used
2711                         for result publication in the study. Otherwise, if automatic
2712                         publication is switched on, default value is used for result name.
2713
2714             Returns:    
2715                 New GEOM.GEOM_Object, containing the created disk.
2716             """
2717             # Example: see GEOM_TestAll.py
2718             theR,Parameters = ParseParameters(theR)
2719             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2720             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2721             anObj.SetParameters(Parameters)
2722             self._autoPublish(anObj, theName, "disk")
2723             return anObj
2724
2725         ## Create a disk, passing through three given points
2726         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2727         #  @param theName Object name; when specified, this parameter is used
2728         #         for result publication in the study. Otherwise, if automatic
2729         #         publication is switched on, default value is used for result name.
2730         #
2731         #  @return New GEOM.GEOM_Object, containing the created disk.
2732         #
2733         #  @ref tui_creation_disk "Example"
2734         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2735             """
2736             Create a disk, passing through three given points
2737
2738             Parameters:
2739                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2740                 theName Object name; when specified, this parameter is used
2741                         for result publication in the study. Otherwise, if automatic
2742                         publication is switched on, default value is used for result name.
2743
2744             Returns:    
2745                 New GEOM.GEOM_Object, containing the created disk.
2746             """
2747             # Example: see GEOM_TestAll.py
2748             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2749             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2750             self._autoPublish(anObj, theName, "disk")
2751             return anObj
2752
2753         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2754         #  @param theR Radius of Face.
2755         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2756         #  @param theName Object name; when specified, this parameter is used
2757         #         for result publication in the study. Otherwise, if automatic
2758         #         publication is switched on, default value is used for result name.
2759         #
2760         #  @return New GEOM.GEOM_Object, containing the created disk.
2761         #
2762         #  @ref tui_creation_face "Example"
2763         def MakeDiskR(self, theR, theOrientation, theName=None):
2764             """
2765             Create a disk with specified dimensions along OX-OY coordinate axes.
2766
2767             Parameters:
2768                 theR Radius of Face.
2769                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2770                 theName Object name; when specified, this parameter is used
2771                         for result publication in the study. Otherwise, if automatic
2772                         publication is switched on, default value is used for result name.
2773
2774             Returns: 
2775                 New GEOM.GEOM_Object, containing the created disk.
2776
2777             Example of usage:
2778                 Disk3 = geompy.MakeDiskR(100., 1)
2779             """
2780             # Example: see GEOM_TestAll.py
2781             theR,Parameters = ParseParameters(theR)
2782             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2783             RaiseIfFailed("MakeDiskR", self.PrimOp)
2784             anObj.SetParameters(Parameters)
2785             self._autoPublish(anObj, theName, "disk")
2786             return anObj
2787
2788         ## Create a cylinder with given base point, axis, radius and height.
2789         #  @param thePnt Central point of cylinder base.
2790         #  @param theAxis Cylinder axis.
2791         #  @param theR Cylinder radius.
2792         #  @param theH Cylinder height.
2793         #  @param theName Object name; when specified, this parameter is used
2794         #         for result publication in the study. Otherwise, if automatic
2795         #         publication is switched on, default value is used for result name.
2796         #
2797         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2798         #
2799         #  @ref tui_creation_cylinder "Example"
2800         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2801             """
2802             Create a cylinder with given base point, axis, radius and height.
2803
2804             Parameters:
2805                 thePnt Central point of cylinder base.
2806                 theAxis Cylinder axis.
2807                 theR Cylinder radius.
2808                 theH Cylinder height.
2809                 theName Object name; when specified, this parameter is used
2810                         for result publication in the study. Otherwise, if automatic
2811                         publication is switched on, default value is used for result name.
2812
2813             Returns: 
2814                 New GEOM.GEOM_Object, containing the created cylinder.
2815             """
2816             # Example: see GEOM_TestAll.py
2817             theR,theH,Parameters = ParseParameters(theR, theH)
2818             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2819             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2820             anObj.SetParameters(Parameters)
2821             self._autoPublish(anObj, theName, "cylinder")
2822             return anObj
2823
2824         ## Create a cylinder with given radius and height at
2825         #  the origin of coordinate system. Axis of the cylinder
2826         #  will be collinear to the OZ axis of the coordinate system.
2827         #  @param theR Cylinder radius.
2828         #  @param theH Cylinder height.
2829         #  @param theName Object name; when specified, this parameter is used
2830         #         for result publication in the study. Otherwise, if automatic
2831         #         publication is switched on, default value is used for result name.
2832         #
2833         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2834         #
2835         #  @ref tui_creation_cylinder "Example"
2836         def MakeCylinderRH(self, theR, theH, theName=None):
2837             """
2838             Create a cylinder with given radius and height at
2839             the origin of coordinate system. Axis of the cylinder
2840             will be collinear to the OZ axis of the coordinate system.
2841
2842             Parameters:
2843                 theR Cylinder radius.
2844                 theH Cylinder height.
2845                 theName Object name; when specified, this parameter is used
2846                         for result publication in the study. Otherwise, if automatic
2847                         publication is switched on, default value is used for result name.
2848
2849             Returns:    
2850                 New GEOM.GEOM_Object, containing the created cylinder.
2851             """
2852             # Example: see GEOM_TestAll.py
2853             theR,theH,Parameters = ParseParameters(theR, theH)
2854             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2855             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2856             anObj.SetParameters(Parameters)
2857             self._autoPublish(anObj, theName, "cylinder")
2858             return anObj
2859
2860         ## Create a sphere with given center and radius.
2861         #  @param thePnt Sphere center.
2862         #  @param theR Sphere radius.
2863         #  @param theName Object name; when specified, this parameter is used
2864         #         for result publication in the study. Otherwise, if automatic
2865         #         publication is switched on, default value is used for result name.
2866         #
2867         #  @return New GEOM.GEOM_Object, containing the created sphere.
2868         #
2869         #  @ref tui_creation_sphere "Example"
2870         def MakeSpherePntR(self, thePnt, theR, theName=None):
2871             """
2872             Create a sphere with given center and radius.
2873
2874             Parameters:
2875                 thePnt Sphere center.
2876                 theR Sphere radius.
2877                 theName Object name; when specified, this parameter is used
2878                         for result publication in the study. Otherwise, if automatic
2879                         publication is switched on, default value is used for result name.
2880
2881             Returns:    
2882                 New GEOM.GEOM_Object, containing the created sphere.            
2883             """
2884             # Example: see GEOM_TestAll.py
2885             theR,Parameters = ParseParameters(theR)
2886             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2887             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2888             anObj.SetParameters(Parameters)
2889             self._autoPublish(anObj, theName, "sphere")
2890             return anObj
2891
2892         ## Create a sphere with given center and radius.
2893         #  @param x,y,z Coordinates of sphere center.
2894         #  @param theR Sphere radius.
2895         #  @param theName Object name; when specified, this parameter is used
2896         #         for result publication in the study. Otherwise, if automatic
2897         #         publication is switched on, default value is used for result name.
2898         #
2899         #  @return New GEOM.GEOM_Object, containing the created sphere.
2900         #
2901         #  @ref tui_creation_sphere "Example"
2902         def MakeSphere(self, x, y, z, theR, theName=None):
2903             """
2904             Create a sphere with given center and radius.
2905
2906             Parameters: 
2907                 x,y,z Coordinates of sphere center.
2908                 theR Sphere radius.
2909                 theName Object name; when specified, this parameter is used
2910                         for result publication in the study. Otherwise, if automatic
2911                         publication is switched on, default value is used for result name.
2912
2913             Returns:
2914                 New GEOM.GEOM_Object, containing the created sphere.
2915             """
2916             # Example: see GEOM_TestAll.py
2917             point = self.MakeVertex(x, y, z)
2918             # note: auto-publishing is done in self.MakeSpherePntR()
2919             anObj = self.MakeSpherePntR(point, theR, theName)
2920             return anObj
2921
2922         ## Create a sphere with given radius at the origin of coordinate system.
2923         #  @param theR Sphere radius.
2924         #  @param theName Object name; when specified, this parameter is used
2925         #         for result publication in the study. Otherwise, if automatic
2926         #         publication is switched on, default value is used for result name.
2927         #
2928         #  @return New GEOM.GEOM_Object, containing the created sphere.
2929         #
2930         #  @ref tui_creation_sphere "Example"
2931         def MakeSphereR(self, theR, theName=None):
2932             """
2933             Create a sphere with given radius at the origin of coordinate system.
2934
2935             Parameters: 
2936                 theR Sphere radius.
2937                 theName Object name; when specified, this parameter is used
2938                         for result publication in the study. Otherwise, if automatic
2939                         publication is switched on, default value is used for result name.
2940
2941             Returns:
2942                 New GEOM.GEOM_Object, containing the created sphere.            
2943             """
2944             # Example: see GEOM_TestAll.py
2945             theR,Parameters = ParseParameters(theR)
2946             anObj = self.PrimOp.MakeSphereR(theR)
2947             RaiseIfFailed("MakeSphereR", self.PrimOp)
2948             anObj.SetParameters(Parameters)
2949             self._autoPublish(anObj, theName, "sphere")
2950             return anObj
2951
2952         ## Create a cone with given base point, axis, height and radiuses.
2953         #  @param thePnt Central point of the first cone base.
2954         #  @param theAxis Cone axis.
2955         #  @param theR1 Radius of the first cone base.
2956         #  @param theR2 Radius of the second cone base.
2957         #    \note If both radiuses are non-zero, the cone will be truncated.
2958         #    \note If the radiuses are equal, a cylinder will be created instead.
2959         #  @param theH Cone height.
2960         #  @param theName Object name; when specified, this parameter is used
2961         #         for result publication in the study. Otherwise, if automatic
2962         #         publication is switched on, default value is used for result name.
2963         #
2964         #  @return New GEOM.GEOM_Object, containing the created cone.
2965         #
2966         #  @ref tui_creation_cone "Example"
2967         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2968             """
2969             Create a cone with given base point, axis, height and radiuses.
2970
2971             Parameters: 
2972                 thePnt Central point of the first cone base.
2973                 theAxis Cone axis.
2974                 theR1 Radius of the first cone base.
2975                 theR2 Radius of the second cone base.
2976                 theH Cone height.
2977                 theName Object name; when specified, this parameter is used
2978                         for result publication in the study. Otherwise, if automatic
2979                         publication is switched on, default value is used for result name.
2980
2981             Note:
2982                 If both radiuses are non-zero, the cone will be truncated.
2983                 If the radiuses are equal, a cylinder will be created instead.
2984
2985             Returns:
2986                 New GEOM.GEOM_Object, containing the created cone.
2987             """
2988             # Example: see GEOM_TestAll.py
2989             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2990             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2991             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2992             anObj.SetParameters(Parameters)
2993             self._autoPublish(anObj, theName, "cone")
2994             return anObj
2995
2996         ## Create a cone with given height and radiuses at
2997         #  the origin of coordinate system. Axis of the cone will
2998         #  be collinear to the OZ axis of the coordinate system.
2999         #  @param theR1 Radius of the first cone base.
3000         #  @param theR2 Radius of the second cone base.
3001         #    \note If both radiuses are non-zero, the cone will be truncated.
3002         #    \note If the radiuses are equal, a cylinder will be created instead.
3003         #  @param theH Cone height.
3004         #  @param theName Object name; when specified, this parameter is used
3005         #         for result publication in the study. Otherwise, if automatic
3006         #         publication is switched on, default value is used for result name.
3007         #
3008         #  @return New GEOM.GEOM_Object, containing the created cone.
3009         #
3010         #  @ref tui_creation_cone "Example"
3011         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3012             """
3013             Create a cone with given height and radiuses at
3014             the origin of coordinate system. Axis of the cone will
3015             be collinear to the OZ axis of the coordinate system.
3016
3017             Parameters: 
3018                 theR1 Radius of the first cone base.
3019                 theR2 Radius of the second cone base.
3020                 theH Cone height.
3021                 theName Object name; when specified, this parameter is used
3022                         for result publication in the study. Otherwise, if automatic
3023                         publication is switched on, default value is used for result name.
3024
3025             Note:
3026                 If both radiuses are non-zero, the cone will be truncated.
3027                 If the radiuses are equal, a cylinder will be created instead.
3028
3029             Returns:
3030                 New GEOM.GEOM_Object, containing the created cone.
3031             """
3032             # Example: see GEOM_TestAll.py
3033             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3034             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3035             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3036             anObj.SetParameters(Parameters)
3037             self._autoPublish(anObj, theName, "cone")
3038             return anObj
3039
3040         ## Create a torus with given center, normal vector and radiuses.
3041         #  @param thePnt Torus central point.
3042         #  @param theVec Torus axis of symmetry.
3043         #  @param theRMajor Torus major radius.
3044         #  @param theRMinor Torus minor radius.
3045         #  @param theName Object name; when specified, this parameter is used
3046         #         for result publication in the study. Otherwise, if automatic
3047         #         publication is switched on, default value is used for result name.
3048         #
3049         #  @return New GEOM.GEOM_Object, containing the created torus.
3050         #
3051         #  @ref tui_creation_torus "Example"
3052         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3053             """
3054             Create a torus with given center, normal vector and radiuses.
3055
3056             Parameters: 
3057                 thePnt Torus central point.
3058                 theVec Torus axis of symmetry.
3059                 theRMajor Torus major radius.
3060                 theRMinor Torus minor radius.
3061                 theName Object name; when specified, this parameter is used
3062                         for result publication in the study. Otherwise, if automatic
3063                         publication is switched on, default value is used for result name.
3064
3065            Returns:
3066                 New GEOM.GEOM_Object, containing the created torus.
3067             """
3068             # Example: see GEOM_TestAll.py
3069             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3070             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3071             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3072             anObj.SetParameters(Parameters)
3073             self._autoPublish(anObj, theName, "torus")
3074             return anObj
3075
3076         ## Create a torus with given radiuses at the origin of coordinate system.
3077         #  @param theRMajor Torus major radius.
3078         #  @param theRMinor Torus minor radius.
3079         #  @param theName Object name; when specified, this parameter is used
3080         #         for result publication in the study. Otherwise, if automatic
3081         #         publication is switched on, default value is used for result name.
3082         #
3083         #  @return New GEOM.GEOM_Object, containing the created torus.
3084         #
3085         #  @ref tui_creation_torus "Example"
3086         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3087             """
3088            Create a torus with given radiuses at the origin of coordinate system.
3089
3090            Parameters: 
3091                 theRMajor Torus major radius.
3092                 theRMinor Torus minor radius.
3093                 theName Object name; when specified, this parameter is used
3094                         for result publication in the study. Otherwise, if automatic
3095                         publication is switched on, default value is used for result name.
3096
3097            Returns:
3098                 New GEOM.GEOM_Object, containing the created torus.            
3099             """
3100             # Example: see GEOM_TestAll.py
3101             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3102             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3103             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3104             anObj.SetParameters(Parameters)
3105             self._autoPublish(anObj, theName, "torus")
3106             return anObj
3107
3108         # end of l3_3d_primitives
3109         ## @}
3110
3111         ## @addtogroup l3_complex
3112         ## @{
3113
3114         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3115         #  @param theBase Base shape to be extruded.
3116         #  @param thePoint1 First end of extrusion vector.
3117         #  @param thePoint2 Second end of extrusion vector.
3118         #  @param theScaleFactor Use it to make prism with scaled second base.
3119         #                        Nagative value means not scaled second base.
3120         #  @param theName Object name; when specified, this parameter is used
3121         #         for result publication in the study. Otherwise, if automatic
3122         #         publication is switched on, default value is used for result name.
3123         #
3124         #  @return New GEOM.GEOM_Object, containing the created prism.
3125         #
3126         #  @ref tui_creation_prism "Example"
3127         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3128             """
3129             Create a shape by extrusion of the base shape along a vector, defined by two points.
3130
3131             Parameters: 
3132                 theBase Base shape to be extruded.
3133                 thePoint1 First end of extrusion vector.
3134                 thePoint2 Second end of extrusion vector.
3135                 theScaleFactor Use it to make prism with scaled second base.
3136                                Nagative value means not scaled second base.
3137                 theName Object name; when specified, this parameter is used
3138                         for result publication in the study. Otherwise, if automatic
3139                         publication is switched on, default value is used for result name.
3140
3141             Returns:
3142                 New GEOM.GEOM_Object, containing the created prism.
3143             """
3144             # Example: see GEOM_TestAll.py
3145             anObj = None
3146             Parameters = ""
3147             if theScaleFactor > 0:
3148                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3149                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3150             else:
3151                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3152             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3153             anObj.SetParameters(Parameters)
3154             self._autoPublish(anObj, theName, "prism")
3155             return anObj
3156
3157         ## Create a shape by extrusion of the base shape along a
3158         #  vector, defined by two points, in 2 Ways (forward/backward).
3159         #  @param theBase Base shape to be extruded.
3160         #  @param thePoint1 First end of extrusion vector.
3161         #  @param thePoint2 Second end of extrusion vector.
3162         #  @param theName Object name; when specified, this parameter is used
3163         #         for result publication in the study. Otherwise, if automatic
3164         #         publication is switched on, default value is used for result name.
3165         #
3166         #  @return New GEOM.GEOM_Object, containing the created prism.
3167         #
3168         #  @ref tui_creation_prism "Example"
3169         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3170             """
3171             Create a shape by extrusion of the base shape along a
3172             vector, defined by two points, in 2 Ways (forward/backward).
3173
3174             Parameters: 
3175                 theBase Base shape to be extruded.
3176                 thePoint1 First end of extrusion vector.
3177                 thePoint2 Second end of extrusion vector.
3178                 theName Object name; when specified, this parameter is used
3179                         for result publication in the study. Otherwise, if automatic
3180                         publication is switched on, default value is used for result name.
3181
3182             Returns:
3183                 New GEOM.GEOM_Object, containing the created prism.
3184             """
3185             # Example: see GEOM_TestAll.py
3186             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3187             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3188             self._autoPublish(anObj, theName, "prism")
3189             return anObj
3190
3191         ## Create a shape by extrusion of the base shape along the vector,
3192         #  i.e. all the space, transfixed by the base shape during its translation
3193         #  along the vector on the given distance.
3194         #  @param theBase Base shape to be extruded.
3195         #  @param theVec Direction of extrusion.
3196         #  @param theH Prism dimension along theVec.
3197         #  @param theScaleFactor Use it to make prism with scaled second base.
3198         #                        Negative value means not scaled second base.
3199         #  @param theName Object name; when specified, this parameter is used
3200         #         for result publication in the study. Otherwise, if automatic
3201         #         publication is switched on, default value is used for result name.
3202         #
3203         #  @return New GEOM.GEOM_Object, containing the created prism.
3204         #
3205         #  @ref tui_creation_prism "Example"
3206         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3207             """
3208             Create a shape by extrusion of the base shape along the vector,
3209             i.e. all the space, transfixed by the base shape during its translation
3210             along the vector on the given distance.
3211
3212             Parameters: 
3213                 theBase Base shape to be extruded.
3214                 theVec Direction of extrusion.
3215                 theH Prism dimension along theVec.
3216                 theScaleFactor Use it to make prism with scaled second base.
3217                                Negative value means not scaled second base.
3218                 theName Object name; when specified, this parameter is used
3219                         for result publication in the study. Otherwise, if automatic
3220                         publication is switched on, default value is used for result name.
3221
3222             Returns:
3223                 New GEOM.GEOM_Object, containing the created prism.
3224             """
3225             # Example: see GEOM_TestAll.py
3226             anObj = None
3227             Parameters = ""
3228             if theScaleFactor > 0:
3229                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3230                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3231             else:
3232                 theH,Parameters = ParseParameters(theH)
3233                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3234             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3235             anObj.SetParameters(Parameters)
3236             self._autoPublish(anObj, theName, "prism")
3237             return anObj
3238
3239         ## Create a shape by extrusion of the base shape along the vector,
3240         #  i.e. all the space, transfixed by the base shape during its translation
3241         #  along the vector on the given distance in 2 Ways (forward/backward).
3242         #  @param theBase Base shape to be extruded.
3243         #  @param theVec Direction of extrusion.
3244         #  @param theH Prism dimension along theVec in forward direction.
3245         #  @param theName Object name; when specified, this parameter is used
3246         #         for result publication in the study. Otherwise, if automatic
3247         #         publication is switched on, default value is used for result name.
3248         #
3249         #  @return New GEOM.GEOM_Object, containing the created prism.
3250         #
3251         #  @ref tui_creation_prism "Example"
3252         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3253             """
3254             Create a shape by extrusion of the base shape along the vector,
3255             i.e. all the space, transfixed by the base shape during its translation
3256             along the vector on the given distance in 2 Ways (forward/backward).
3257
3258             Parameters:
3259                 theBase Base shape to be extruded.
3260                 theVec Direction of extrusion.
3261                 theH Prism dimension along theVec in forward direction.
3262                 theName Object name; when specified, this parameter is used
3263                         for result publication in the study. Otherwise, if automatic
3264                         publication is switched on, default value is used for result name.
3265
3266             Returns:
3267                 New GEOM.GEOM_Object, containing the created prism.
3268             """
3269             # Example: see GEOM_TestAll.py
3270             theH,Parameters = ParseParameters(theH)
3271             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3272             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3273             anObj.SetParameters(Parameters)
3274             self._autoPublish(anObj, theName, "prism")
3275             return anObj
3276
3277         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3278         #  @param theBase Base shape to be extruded.
3279         #  @param theDX, theDY, theDZ Directions of extrusion.
3280         #  @param theScaleFactor Use it to make prism with scaled second base.
3281         #                        Nagative value means not scaled second base.
3282         #  @param theName Object name; when specified, this parameter is used
3283         #         for result publication in the study. Otherwise, if automatic
3284         #         publication is switched on, default value is used for result name.
3285         #
3286         #  @return New GEOM.GEOM_Object, containing the created prism.
3287         #
3288         #  @ref tui_creation_prism "Example"
3289         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3290             """
3291             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3292
3293             Parameters:
3294                 theBase Base shape to be extruded.
3295                 theDX, theDY, theDZ Directions of extrusion.
3296                 theScaleFactor Use it to make prism with scaled second base.
3297                                Nagative value means not scaled second base.
3298                 theName Object name; when specified, this parameter is used
3299                         for result publication in the study. Otherwise, if automatic
3300                         publication is switched on, default value is used for result name.
3301
3302             Returns: 
3303                 New GEOM.GEOM_Object, containing the created prism.
3304             """
3305             # Example: see GEOM_TestAll.py
3306             anObj = None
3307             Parameters = ""
3308             if theScaleFactor > 0:
3309                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3310                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3311             else:
3312                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3313                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3314             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3315             anObj.SetParameters(Parameters)
3316             self._autoPublish(anObj, theName, "prism")
3317             return anObj
3318
3319         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3320         #  i.e. all the space, transfixed by the base shape during its translation
3321         #  along the vector on the given distance in 2 Ways (forward/backward).
3322         #  @param theBase Base shape to be extruded.
3323         #  @param theDX, theDY, theDZ Directions of extrusion.
3324         #  @param theName Object name; when specified, this parameter is used
3325         #         for result publication in the study. Otherwise, if automatic
3326         #         publication is switched on, default value is used for result name.
3327         #
3328         #  @return New GEOM.GEOM_Object, containing the created prism.
3329         #
3330         #  @ref tui_creation_prism "Example"
3331         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3332             """
3333             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3334             i.e. all the space, transfixed by the base shape during its translation
3335             along the vector on the given distance in 2 Ways (forward/backward).
3336
3337             Parameters:
3338                 theBase Base shape to be extruded.
3339                 theDX, theDY, theDZ Directions of extrusion.
3340                 theName Object name; when specified, this parameter is used
3341                         for result publication in the study. Otherwise, if automatic
3342                         publication is switched on, default value is used for result name.
3343
3344             Returns:
3345                 New GEOM.GEOM_Object, containing the created prism.
3346             """
3347             # Example: see GEOM_TestAll.py
3348             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3349             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3350             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3351             anObj.SetParameters(Parameters)
3352             self._autoPublish(anObj, theName, "prism")
3353             return anObj
3354
3355         ## Create a shape by revolution of the base shape around the axis
3356         #  on the given angle, i.e. all the space, transfixed by the base
3357         #  shape during its rotation around the axis on the given angle.
3358         #  @param theBase Base shape to be rotated.
3359         #  @param theAxis Rotation axis.
3360         #  @param theAngle Rotation angle in radians.
3361         #  @param theName Object name; when specified, this parameter is used
3362         #         for result publication in the study. Otherwise, if automatic
3363         #         publication is switched on, default value is used for result name.
3364         #
3365         #  @return New GEOM.GEOM_Object, containing the created revolution.
3366         #
3367         #  @ref tui_creation_revolution "Example"
3368         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3369             """
3370             Create a shape by revolution of the base shape around the axis
3371             on the given angle, i.e. all the space, transfixed by the base
3372             shape during its rotation around the axis on the given angle.
3373
3374             Parameters:
3375                 theBase Base shape to be rotated.
3376                 theAxis Rotation axis.
3377                 theAngle Rotation angle in radians.
3378                 theName Object name; when specified, this parameter is used
3379                         for result publication in the study. Otherwise, if automatic
3380                         publication is switched on, default value is used for result name.
3381
3382             Returns: 
3383                 New GEOM.GEOM_Object, containing the created revolution.
3384             """
3385             # Example: see GEOM_TestAll.py
3386             theAngle,Parameters = ParseParameters(theAngle)
3387             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3388             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3389             anObj.SetParameters(Parameters)
3390             self._autoPublish(anObj, theName, "revolution")
3391             return anObj
3392
3393         ## Create a shape by revolution of the base shape around the axis
3394         #  on the given angle, i.e. all the space, transfixed by the base
3395         #  shape during its rotation around the axis on the given angle in
3396         #  both directions (forward/backward)
3397         #  @param theBase Base shape to be rotated.
3398         #  @param theAxis Rotation axis.
3399         #  @param theAngle Rotation angle in radians.
3400         #  @param theName Object name; when specified, this parameter is used
3401         #         for result publication in the study. Otherwise, if automatic
3402         #         publication is switched on, default value is used for result name.
3403         #
3404         #  @return New GEOM.GEOM_Object, containing the created revolution.
3405         #
3406         #  @ref tui_creation_revolution "Example"
3407         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3408             """
3409             Create a shape by revolution of the base shape around the axis
3410             on the given angle, i.e. all the space, transfixed by the base
3411             shape during its rotation around the axis on the given angle in
3412             both directions (forward/backward).
3413
3414             Parameters:
3415                 theBase Base shape to be rotated.
3416                 theAxis Rotation axis.
3417                 theAngle Rotation angle in radians.
3418                 theName Object name; when specified, this parameter is used
3419                         for result publication in the study. Otherwise, if automatic
3420                         publication is switched on, default value is used for result name.
3421
3422             Returns: 
3423                 New GEOM.GEOM_Object, containing the created revolution.
3424             """
3425             theAngle,Parameters = ParseParameters(theAngle)
3426             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3427             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3428             anObj.SetParameters(Parameters)
3429             self._autoPublish(anObj, theName, "revolution")
3430             return anObj
3431
3432         ## Create a filling from the given compound of contours.
3433         #  @param theShape the compound of contours
3434         #  @param theMinDeg a minimal degree of BSpline surface to create
3435         #  @param theMaxDeg a maximal degree of BSpline surface to create
3436         #  @param theTol2D a 2d tolerance to be reached
3437         #  @param theTol3D a 3d tolerance to be reached
3438         #  @param theNbIter a number of iteration of approximation algorithm
3439         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3440         #  @param isApprox if True, BSpline curves are generated in the process
3441         #                  of surface construction. By default it is False, that means
3442         #                  the surface is created using given curves. The usage of
3443         #                  Approximation makes the algorithm work slower, but allows
3444         #                  building the surface for rather complex cases.
3445         #  @param theName Object name; when specified, this parameter is used
3446         #         for result publication in the study. Otherwise, if automatic
3447         #         publication is switched on, default value is used for result name.
3448         #
3449         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3450         #
3451         #  @ref tui_creation_filling "Example"
3452         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3453                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3454             """
3455             Create a filling from the given compound of contours.
3456
3457             Parameters:
3458                 theShape the compound of contours
3459                 theMinDeg a minimal degree of BSpline surface to create
3460                 theMaxDeg a maximal degree of BSpline surface to create
3461                 theTol2D a 2d tolerance to be reached
3462                 theTol3D a 3d tolerance to be reached
3463                 theNbIter a number of iteration of approximation algorithm
3464                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3465                 isApprox if True, BSpline curves are generated in the process
3466                          of surface construction. By default it is False, that means
3467                          the surface is created using given curves. The usage of
3468                          Approximation makes the algorithm work slower, but allows
3469                          building the surface for rather complex cases
3470                 theName Object name; when specified, this parameter is used
3471                         for result publication in the study. Otherwise, if automatic
3472                         publication is switched on, default value is used for result name.
3473
3474             Returns: 
3475                 New GEOM.GEOM_Object, containing the created filling surface.
3476
3477             Example of usage:
3478                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3479             """
3480             # Example: see GEOM_TestAll.py
3481             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3482             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3483                                             theTol2D, theTol3D, theNbIter,
3484                                             theMethod, isApprox)
3485             RaiseIfFailed("MakeFilling", self.PrimOp)
3486             anObj.SetParameters(Parameters)
3487             self._autoPublish(anObj, theName, "filling")
3488             return anObj
3489
3490
3491         ## Create a filling from the given compound of contours.
3492         #  This method corresponds to MakeFilling with isApprox=True
3493         #  @param theShape the compound of contours
3494         #  @param theMinDeg a minimal degree of BSpline surface to create
3495         #  @param theMaxDeg a maximal degree of BSpline surface to create
3496         #  @param theTol3D a 3d tolerance to be reached
3497         #  @param theName Object name; when specified, this parameter is used
3498         #         for result publication in the study. Otherwise, if automatic
3499         #         publication is switched on, default value is used for result name.
3500         #
3501         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3502         #
3503         #  @ref tui_creation_filling "Example"
3504         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3505             """
3506             Create a filling from the given compound of contours.
3507             This method corresponds to MakeFilling with isApprox=True
3508
3509             Parameters:
3510                 theShape the compound of contours
3511                 theMinDeg a minimal degree of BSpline surface to create
3512                 theMaxDeg a maximal degree of BSpline surface to create
3513                 theTol3D a 3d tolerance to be reached
3514                 theName Object name; when specified, this parameter is used
3515                         for result publication in the study. Otherwise, if automatic
3516                         publication is switched on, default value is used for result name.
3517
3518             Returns: 
3519                 New GEOM.GEOM_Object, containing the created filling surface.
3520
3521             Example of usage:
3522                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3523             """
3524             # Example: see GEOM_TestAll.py
3525             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3526             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3527                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3528             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3529             anObj.SetParameters(Parameters)
3530             self._autoPublish(anObj, theName, "filling")
3531             return anObj
3532
3533         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3534         #  @param theSeqSections - set of specified sections.
3535         #  @param theModeSolid - mode defining building solid or shell
3536         #  @param thePreci - precision 3D used for smoothing
3537         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3538         #  @param theName Object name; when specified, this parameter is used
3539         #         for result publication in the study. Otherwise, if automatic
3540         #         publication is switched on, default value is used for result name.
3541         #
3542         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3543         #
3544         #  @ref swig_todo "Example"
3545         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3546             """
3547             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3548
3549             Parameters:
3550                 theSeqSections - set of specified sections.
3551                 theModeSolid - mode defining building solid or shell
3552                 thePreci - precision 3D used for smoothing
3553                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3554                 theName Object name; when specified, this parameter is used
3555                         for result publication in the study. Otherwise, if automatic
3556                         publication is switched on, default value is used for result name.
3557
3558             Returns:
3559                 New GEOM.GEOM_Object, containing the created shell or solid.
3560             """
3561             # Example: see GEOM_TestAll.py
3562             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3563             RaiseIfFailed("MakeThruSections", self.PrimOp)
3564             self._autoPublish(anObj, theName, "filling")
3565             return anObj
3566
3567         ## Create a shape by extrusion of the base shape along
3568         #  the path shape. The path shape can be a wire or an edge.
3569         #  @param theBase Base shape to be extruded.
3570         #  @param thePath Path shape to extrude the base shape along it.
3571         #  @param theName Object name; when specified, this parameter is used
3572         #         for result publication in the study. Otherwise, if automatic
3573         #         publication is switched on, default value is used for result name.
3574         #
3575         #  @return New GEOM.GEOM_Object, containing the created pipe.
3576         #
3577         #  @ref tui_creation_pipe "Example"
3578         def MakePipe(self, theBase, thePath, theName=None):
3579             """
3580             Create a shape by extrusion of the base shape along
3581             the path shape. The path shape can be a wire or an edge.
3582
3583             Parameters:
3584                 theBase Base shape to be extruded.
3585                 thePath Path shape to extrude the base shape along it.
3586                 theName Object name; when specified, this parameter is used
3587                         for result publication in the study. Otherwise, if automatic
3588                         publication is switched on, default value is used for result name.
3589
3590             Returns:
3591                 New GEOM.GEOM_Object, containing the created pipe.
3592             """
3593             # Example: see GEOM_TestAll.py
3594             anObj = self.PrimOp.MakePipe(theBase, thePath)
3595             RaiseIfFailed("MakePipe", self.PrimOp)
3596             self._autoPublish(anObj, theName, "pipe")
3597             return anObj
3598
3599         ## Create a shape by extrusion of the profile shape along
3600         #  the path shape. The path shape can be a wire or an edge.
3601         #  the several profiles can be specified in the several locations of path.
3602         #  @param theSeqBases - list of  Bases shape to be extruded.
3603         #  @param theLocations - list of locations on the path corresponding
3604         #                        specified list of the Bases shapes. Number of locations
3605         #                        should be equal to number of bases or list of locations can be empty.
3606         #  @param thePath - Path shape to extrude the base shape along it.
3607         #  @param theWithContact - the mode defining that the section is translated to be in
3608         #                          contact with the spine.
3609         #  @param theWithCorrection - defining that the section is rotated to be
3610         #                             orthogonal to the spine tangent in the correspondent point
3611         #  @param theName Object name; when specified, this parameter is used
3612         #         for result publication in the study. Otherwise, if automatic
3613         #         publication is switched on, default value is used for result name.
3614         #
3615         #  @return New GEOM.GEOM_Object, containing the created pipe.
3616         #
3617         #  @ref tui_creation_pipe_with_diff_sec "Example"
3618         def MakePipeWithDifferentSections(self, theSeqBases,
3619                                           theLocations, thePath,
3620                                           theWithContact, theWithCorrection, theName=None):
3621             """
3622             Create a shape by extrusion of the profile shape along
3623             the path shape. The path shape can be a wire or an edge.
3624             the several profiles can be specified in the several locations of path.
3625
3626             Parameters:
3627                 theSeqBases - list of  Bases shape to be extruded.
3628                 theLocations - list of locations on the path corresponding
3629                                specified list of the Bases shapes. Number of locations
3630                                should be equal to number of bases or list of locations can be empty.
3631                 thePath - Path shape to extrude the base shape along it.
3632                 theWithContact - the mode defining that the section is translated to be in
3633                                  contact with the spine(0/1)
3634                 theWithCorrection - defining that the section is rotated to be
3635                                     orthogonal to the spine tangent in the correspondent point (0/1)
3636                 theName Object name; when specified, this parameter is used
3637                         for result publication in the study. Otherwise, if automatic
3638                         publication is switched on, default value is used for result name.
3639
3640             Returns:
3641                 New GEOM.GEOM_Object, containing the created pipe.
3642             """
3643             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3644                                                               theLocations, thePath,
3645                                                               theWithContact, theWithCorrection)
3646             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3647             self._autoPublish(anObj, theName, "pipe")
3648             return anObj
3649
3650         ## Create a shape by extrusion of the profile shape along
3651         #  the path shape. The path shape can be a wire or a edge.
3652         #  the several profiles can be specified in the several locations of path.
3653         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3654         #                       shell or face. If number of faces in neighbour sections
3655         #                       aren't coincided result solid between such sections will
3656         #                       be created using external boundaries of this shells.
3657         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3658         #                          This list is used for searching correspondences between
3659         #                          faces in the sections. Size of this list must be equal
3660         #                          to size of list of base shapes.
3661         #  @param theLocations - list of locations on the path corresponding
3662         #                        specified list of the Bases shapes. Number of locations
3663         #                        should be equal to number of bases. First and last
3664         #                        locations must be coincided with first and last vertexes
3665         #                        of path correspondingly.
3666         #  @param thePath - Path shape to extrude the base shape along it.
3667         #  @param theWithContact - the mode defining that the section is translated to be in
3668         #                          contact with the spine.
3669         #  @param theWithCorrection - defining that the section is rotated to be
3670         #                             orthogonal to the spine tangent in the correspondent point
3671         #  @param theName Object name; when specified, this parameter is used
3672         #         for result publication in the study. Otherwise, if automatic
3673         #         publication is switched on, default value is used for result name.
3674         #
3675         #  @return New GEOM.GEOM_Object, containing the created solids.
3676         #
3677         #  @ref tui_creation_pipe_with_shell_sec "Example"
3678         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3679                                       theLocations, thePath,
3680                                       theWithContact, theWithCorrection, theName=None):
3681             """
3682             Create a shape by extrusion of the profile shape along
3683             the path shape. The path shape can be a wire or a edge.
3684             the several profiles can be specified in the several locations of path.
3685
3686             Parameters:
3687                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3688                               shell or face. If number of faces in neighbour sections
3689                               aren't coincided result solid between such sections will
3690                               be created using external boundaries of this shells.
3691                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3692                                  This list is used for searching correspondences between
3693                                  faces in the sections. Size of this list must be equal
3694                                  to size of list of base shapes.
3695                 theLocations - list of locations on the path corresponding
3696                                specified list of the Bases shapes. Number of locations
3697                                should be equal to number of bases. First and last
3698                                locations must be coincided with first and last vertexes
3699                                of path correspondingly.
3700                 thePath - Path shape to extrude the base shape along it.
3701                 theWithContact - the mode defining that the section is translated to be in
3702                                  contact with the spine (0/1)
3703                 theWithCorrection - defining that the section is rotated to be
3704                                     orthogonal to the spine tangent in the correspondent point (0/1)
3705                 theName Object name; when specified, this parameter is used
3706                         for result publication in the study. Otherwise, if automatic
3707                         publication is switched on, default value is used for result name.
3708
3709             Returns:                           
3710                 New GEOM.GEOM_Object, containing the created solids.
3711             """
3712             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3713                                                           theLocations, thePath,
3714                                                           theWithContact, theWithCorrection)
3715             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3716             self._autoPublish(anObj, theName, "pipe")
3717             return anObj
3718
3719         ## Create a shape by extrusion of the profile shape along
3720         #  the path shape. This function is used only for debug pipe
3721         #  functionality - it is a version of function MakePipeWithShellSections()
3722         #  which give a possibility to recieve information about
3723         #  creating pipe between each pair of sections step by step.
3724         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3725                                              theLocations, thePath,
3726                                              theWithContact, theWithCorrection, theName=None):
3727             """
3728             Create a shape by extrusion of the profile shape along
3729             the path shape. This function is used only for debug pipe
3730             functionality - it is a version of previous function
3731             geompy.MakePipeWithShellSections() which give a possibility to
3732             recieve information about creating pipe between each pair of
3733             sections step by step.
3734             """
3735             res = []
3736             nbsect = len(theSeqBases)
3737             nbsubsect = len(theSeqSubBases)
3738             #print "nbsect = ",nbsect
3739             for i in range(1,nbsect):
3740                 #print "  i = ",i
3741                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3742                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3743                 tmpSeqSubBases = []
3744                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3745                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3746                                                               tmpLocations, thePath,
3747                                                               theWithContact, theWithCorrection)
3748                 if self.PrimOp.IsDone() == 0:
3749                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3750                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3751                     break
3752                 else:
3753                     print "Pipe between ",i," and ",i+1," sections is OK"
3754                     res.append(anObj)
3755                     pass
3756                 pass
3757
3758             resc = self.MakeCompound(res)
3759             #resc = self.MakeSewing(res, 0.001)
3760             #print "resc: ",resc
3761             self._autoPublish(resc, theName, "pipe")
3762             return resc
3763
3764         ## Create solids between given sections
3765         #  @param theSeqBases - list of sections (shell or face).
3766         #  @param theLocations - list of corresponding vertexes
3767         #  @param theName Object name; when specified, this parameter is used
3768         #         for result publication in the study. Otherwise, if automatic
3769         #         publication is switched on, default value is used for result name.
3770         #
3771         #  @return New GEOM.GEOM_Object, containing the created solids.
3772         #
3773         #  @ref tui_creation_pipe_without_path "Example"
3774         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3775             """
3776             Create solids between given sections
3777
3778             Parameters:
3779                 theSeqBases - list of sections (shell or face).
3780                 theLocations - list of corresponding vertexes
3781                 theName Object name; when specified, this parameter is used
3782                         for result publication in the study. Otherwise, if automatic
3783                         publication is switched on, default value is used for result name.
3784
3785             Returns:
3786                 New GEOM.GEOM_Object, containing the created solids.
3787             """
3788             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3789             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3790             self._autoPublish(anObj, theName, "pipe")
3791             return anObj
3792
3793         ## Create a shape by extrusion of the base shape along
3794         #  the path shape with constant bi-normal direction along the given vector.
3795         #  The path shape can be a wire or an edge.
3796         #  @param theBase Base shape to be extruded.
3797         #  @param thePath Path shape to extrude the base shape along it.
3798         #  @param theVec Vector defines a constant binormal direction to keep the
3799         #                same angle beetween the direction and the sections
3800         #                along the sweep surface.
3801         #  @param theName Object name; when specified, this parameter is used
3802         #         for result publication in the study. Otherwise, if automatic
3803         #         publication is switched on, default value is used for result name.
3804         #
3805         #  @return New GEOM.GEOM_Object, containing the created pipe.
3806         #
3807         #  @ref tui_creation_pipe "Example"
3808         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3809             """
3810             Create a shape by extrusion of the base shape along
3811             the path shape with constant bi-normal direction along the given vector.
3812             The path shape can be a wire or an edge.
3813
3814             Parameters:
3815                 theBase Base shape to be extruded.
3816                 thePath Path shape to extrude the base shape along it.
3817                 theVec Vector defines a constant binormal direction to keep the
3818                        same angle beetween the direction and the sections
3819                        along the sweep surface.
3820                 theName Object name; when specified, this parameter is used
3821                         for result publication in the study. Otherwise, if automatic
3822                         publication is switched on, default value is used for result name.
3823
3824             Returns:              
3825                 New GEOM.GEOM_Object, containing the created pipe.
3826             """
3827             # Example: see GEOM_TestAll.py
3828             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3829             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3830             self._autoPublish(anObj, theName, "pipe")
3831             return anObj
3832               
3833         ## Makes a thick solid from a face or a shell
3834         #  @param theShape Face or Shell to be thicken
3835         #  @param theThickness Thickness of the resulting solid
3836         #  @param theName Object name; when specified, this parameter is used
3837         #         for result publication in the study. Otherwise, if automatic
3838         #         publication is switched on, default value is used for result name.
3839         #
3840         #  @return New GEOM.GEOM_Object, containing the created solid
3841         #
3842         def MakeThickSolid(self, theShape, theThickness, theName=None):
3843             """
3844             Make a thick solid from a face or a shell
3845
3846             Parameters:
3847                  theShape Face or Shell to be thicken
3848                  theThickness Thickness of the resulting solid
3849                  theName Object name; when specified, this parameter is used
3850                  for result publication in the study. Otherwise, if automatic
3851                  publication is switched on, default value is used for result name.
3852                  
3853             Returns:
3854                 New GEOM.GEOM_Object, containing the created solid
3855             """
3856             # Example: see GEOM_TestAll.py
3857             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3858             RaiseIfFailed("MakeThickening", self.PrimOp)
3859             self._autoPublish(anObj, theName, "pipe")
3860             return anObj
3861             
3862
3863         ## Modifies a face or a shell to make it a thick solid
3864         #  @param theShape Face or Shell to be thicken
3865         #  @param theThickness Thickness of the resulting solid
3866         #
3867         #  @return The modified shape
3868         #
3869         def Thicken(self, theShape, theThickness):
3870             """
3871             Modifies a face or a shell to make it a thick solid
3872
3873             Parameters:
3874                 theBase Base shape to be extruded.
3875                 thePath Path shape to extrude the base shape along it.
3876                 theName Object name; when specified, this parameter is used
3877                         for result publication in the study. Otherwise, if automatic
3878                         publication is switched on, default value is used for result name.
3879
3880             Returns:
3881                 The modified shape
3882             """
3883             # Example: see GEOM_TestAll.py
3884             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3885             RaiseIfFailed("MakeThickening", self.PrimOp)
3886             return anObj
3887
3888         ## Build a middle path of a pipe-like shape.
3889         #  The path shape can be a wire or an edge.
3890         #  @param theShape It can be closed or unclosed pipe-like shell
3891         #                  or a pipe-like solid.
3892         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3893         #                            should be wires or faces of theShape.
3894         #  @param theName Object name; when specified, this parameter is used
3895         #         for result publication in the study. Otherwise, if automatic
3896         #         publication is switched on, default value is used for result name.
3897         #
3898         #  @note It is not assumed that exact or approximate copy of theShape
3899         #        can be obtained by applying existing Pipe operation on the
3900         #        resulting "Path" wire taking theBase1 as the base - it is not
3901         #        always possible; though in some particular cases it might work
3902         #        it is not guaranteed. Thus, RestorePath function should not be
3903         #        considered as an exact reverse operation of the Pipe.
3904         #
3905         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3906         #                                source pipe's "path".
3907         #
3908         #  @ref tui_creation_pipe_path "Example"
3909         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3910             """
3911             Build a middle path of a pipe-like shape.
3912             The path shape can be a wire or an edge.
3913
3914             Parameters:
3915                 theShape It can be closed or unclosed pipe-like shell
3916                          or a pipe-like solid.
3917                 theBase1, theBase2 Two bases of the supposed pipe. This
3918                                    should be wires or faces of theShape.
3919                 theName Object name; when specified, this parameter is used
3920                         for result publication in the study. Otherwise, if automatic
3921                         publication is switched on, default value is used for result name.
3922
3923             Returns:
3924                 New GEOM_Object, containing an edge or wire that represent
3925                                  source pipe's path.
3926             """
3927             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3928             RaiseIfFailed("RestorePath", self.PrimOp)
3929             self._autoPublish(anObj, theName, "path")
3930             return anObj
3931
3932         ## Build a middle path of a pipe-like shape.
3933         #  The path shape can be a wire or an edge.
3934         #  @param theShape It can be closed or unclosed pipe-like shell
3935         #                  or a pipe-like solid.
3936         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3937         #                                should be lists of edges of theShape.
3938         #  @param theName Object name; when specified, this parameter is used
3939         #         for result publication in the study. Otherwise, if automatic
3940         #         publication is switched on, default value is used for result name.
3941         #
3942         #  @note It is not assumed that exact or approximate copy of theShape
3943         #        can be obtained by applying existing Pipe operation on the
3944         #        resulting "Path" wire taking theBase1 as the base - it is not
3945         #        always possible; though in some particular cases it might work
3946         #        it is not guaranteed. Thus, RestorePath function should not be
3947         #        considered as an exact reverse operation of the Pipe.
3948         #
3949         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3950         #                                source pipe's "path".
3951         #
3952         #  @ref tui_creation_pipe_path "Example"
3953         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3954             """
3955             Build a middle path of a pipe-like shape.
3956             The path shape can be a wire or an edge.
3957
3958             Parameters:
3959                 theShape It can be closed or unclosed pipe-like shell
3960                          or a pipe-like solid.
3961                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3962                                        should be lists of edges of theShape.
3963                 theName Object name; when specified, this parameter is used
3964                         for result publication in the study. Otherwise, if automatic
3965                         publication is switched on, default value is used for result name.
3966
3967             Returns:
3968                 New GEOM_Object, containing an edge or wire that represent
3969                                  source pipe's path.
3970             """
3971             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3972             RaiseIfFailed("RestorePath", self.PrimOp)
3973             self._autoPublish(anObj, theName, "path")
3974             return anObj
3975
3976         # end of l3_complex
3977         ## @}
3978
3979         ## @addtogroup l3_advanced
3980         ## @{
3981
3982         ## Create a linear edge with specified ends.
3983         #  @param thePnt1 Point for the first end of edge.
3984         #  @param thePnt2 Point for the second end of edge.
3985         #  @param theName Object name; when specified, this parameter is used
3986         #         for result publication in the study. Otherwise, if automatic
3987         #         publication is switched on, default value is used for result name.
3988         #
3989         #  @return New GEOM.GEOM_Object, containing the created edge.
3990         #
3991         #  @ref tui_creation_edge "Example"
3992         def MakeEdge(self, thePnt1, thePnt2, theName=None):
3993             """
3994             Create a linear edge with specified ends.
3995
3996             Parameters:
3997                 thePnt1 Point for the first end of edge.
3998                 thePnt2 Point for the second end of edge.
3999                 theName Object name; when specified, this parameter is used
4000                         for result publication in the study. Otherwise, if automatic
4001                         publication is switched on, default value is used for result name.
4002
4003             Returns:           
4004                 New GEOM.GEOM_Object, containing the created edge.
4005             """
4006             # Example: see GEOM_TestAll.py
4007             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4008             RaiseIfFailed("MakeEdge", self.ShapesOp)
4009             self._autoPublish(anObj, theName, "edge")
4010             return anObj
4011
4012         ## Create a new edge, corresponding to the given length on the given curve.
4013         #  @param theRefCurve The referenced curve (edge).
4014         #  @param theLength Length on the referenced curve. It can be negative.
4015         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4016         #                       at the end of \a theRefCurve, close to the selected point.
4017         #                       If None, start from the first point of \a theRefCurve.
4018         #  @param theName Object name; when specified, this parameter is used
4019         #         for result publication in the study. Otherwise, if automatic
4020         #         publication is switched on, default value is used for result name.
4021         #
4022         #  @return New GEOM.GEOM_Object, containing the created edge.
4023         #
4024         #  @ref tui_creation_edge "Example"
4025         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4026             """
4027             Create a new edge, corresponding to the given length on the given curve.
4028
4029             Parameters:
4030                 theRefCurve The referenced curve (edge).
4031                 theLength Length on the referenced curve. It can be negative.
4032                 theStartPoint Any point can be selected for it, the new edge will begin
4033                               at the end of theRefCurve, close to the selected point.
4034                               If None, start from the first point of theRefCurve.
4035                 theName Object name; when specified, this parameter is used
4036                         for result publication in the study. Otherwise, if automatic
4037                         publication is switched on, default value is used for result name.
4038
4039             Returns:              
4040                 New GEOM.GEOM_Object, containing the created edge.
4041             """
4042             # Example: see GEOM_TestAll.py
4043             theLength, Parameters = ParseParameters(theLength)
4044             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4045             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4046             anObj.SetParameters(Parameters)
4047             self._autoPublish(anObj, theName, "edge")
4048             return anObj
4049
4050         ## Create an edge from specified wire.
4051         #  @param theWire source Wire
4052         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4053         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4054         #  @param theName Object name; when specified, this parameter is used
4055         #         for result publication in the study. Otherwise, if automatic
4056         #         publication is switched on, default value is used for result name.
4057         #
4058         #  @return New GEOM.GEOM_Object, containing the created edge.
4059         #
4060         #  @ref tui_creation_edge "Example"
4061         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4062             """
4063             Create an edge from specified wire.
4064
4065             Parameters:
4066                 theWire source Wire
4067                 theLinearTolerance linear tolerance value (default = 1e-07)
4068                 theAngularTolerance angular tolerance value (default = 1e-12)
4069                 theName Object name; when specified, this parameter is used
4070                         for result publication in the study. Otherwise, if automatic
4071                         publication is switched on, default value is used for result name.
4072
4073             Returns:
4074                 New GEOM.GEOM_Object, containing the created edge.
4075             """
4076             # Example: see GEOM_TestAll.py
4077             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4078             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4079             self._autoPublish(anObj, theName, "edge")
4080             return anObj
4081
4082         ## Create a wire from the set of edges and wires.
4083         #  @param theEdgesAndWires List of edges and/or wires.
4084         #  @param theTolerance Maximum distance between vertices, that will be merged.
4085         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4086         #  @param theName Object name; when specified, this parameter is used
4087         #         for result publication in the study. Otherwise, if automatic
4088         #         publication is switched on, default value is used for result name.
4089         #
4090         #  @return New GEOM.GEOM_Object, containing the created wire.
4091         #
4092         #  @ref tui_creation_wire "Example"
4093         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4094             """
4095             Create a wire from the set of edges and wires.
4096
4097             Parameters:
4098                 theEdgesAndWires List of edges and/or wires.
4099                 theTolerance Maximum distance between vertices, that will be merged.
4100                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4101                 theName Object name; when specified, this parameter is used
4102                         for result publication in the study. Otherwise, if automatic
4103                         publication is switched on, default value is used for result name.
4104
4105             Returns:                    
4106                 New GEOM.GEOM_Object, containing the created wire.
4107             """
4108             # Example: see GEOM_TestAll.py
4109             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4110             RaiseIfFailed("MakeWire", self.ShapesOp)
4111             self._autoPublish(anObj, theName, "wire")
4112             return anObj
4113
4114         ## Create a face on the given wire.
4115         #  @param theWire closed Wire or Edge to build the face on.
4116         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4117         #                        If the tolerance of the obtained planar face is less
4118         #                        than 1e-06, this face will be returned, otherwise the
4119         #                        algorithm tries to build any suitable face on the given
4120         #                        wire and prints a warning message.
4121         #  @param theName Object name; when specified, this parameter is used
4122         #         for result publication in the study. Otherwise, if automatic
4123         #         publication is switched on, default value is used for result name.
4124         #
4125         #  @return New GEOM.GEOM_Object, containing the created face.
4126         #
4127         #  @ref tui_creation_face "Example"
4128         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4129             """
4130             Create a face on the given wire.
4131
4132             Parameters:
4133                 theWire closed Wire or Edge to build the face on.
4134                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4135                                If the tolerance of the obtained planar face is less
4136                                than 1e-06, this face will be returned, otherwise the
4137                                algorithm tries to build any suitable face on the given
4138                                wire and prints a warning message.
4139                 theName Object name; when specified, this parameter is used
4140                         for result publication in the study. Otherwise, if automatic
4141                         publication is switched on, default value is used for result name.
4142
4143             Returns:
4144                 New GEOM.GEOM_Object, containing the created face.
4145             """
4146             # Example: see GEOM_TestAll.py
4147             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4148             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4149                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4150             else:
4151                 RaiseIfFailed("MakeFace", self.ShapesOp)
4152             self._autoPublish(anObj, theName, "face")
4153             return anObj
4154
4155         ## Create a face on the given wires set.
4156         #  @param theWires List of closed wires or edges to build the face on.
4157         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4158         #                        If the tolerance of the obtained planar face is less
4159         #                        than 1e-06, this face will be returned, otherwise the
4160         #                        algorithm tries to build any suitable face on the given
4161         #                        wire and prints a warning message.
4162         #  @param theName Object name; when specified, this parameter is used
4163         #         for result publication in the study. Otherwise, if automatic
4164         #         publication is switched on, default value is used for result name.
4165         #
4166         #  @return New GEOM.GEOM_Object, containing the created face.
4167         #
4168         #  @ref tui_creation_face "Example"
4169         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4170             """
4171             Create a face on the given wires set.
4172
4173             Parameters:
4174                 theWires List of closed wires or edges to build the face on.
4175                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4176                                If the tolerance of the obtained planar face is less
4177                                than 1e-06, this face will be returned, otherwise the
4178                                algorithm tries to build any suitable face on the given
4179                                wire and prints a warning message.
4180                 theName Object name; when specified, this parameter is used
4181                         for result publication in the study. Otherwise, if automatic
4182                         publication is switched on, default value is used for result name.
4183
4184             Returns: 
4185                 New GEOM.GEOM_Object, containing the created face.
4186             """
4187             # Example: see GEOM_TestAll.py
4188             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4189             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4190                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4191             else:
4192                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4193             self._autoPublish(anObj, theName, "face")
4194             return anObj
4195
4196         ## See MakeFaceWires() method for details.
4197         #
4198         #  @ref tui_creation_face "Example 1"
4199         #  \n @ref swig_MakeFaces  "Example 2"
4200         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4201             """
4202             See geompy.MakeFaceWires() method for details.
4203             """
4204             # Example: see GEOM_TestOthers.py
4205             # note: auto-publishing is done in self.MakeFaceWires()
4206             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4207             return anObj
4208
4209         ## Create a shell from the set of faces and shells.
4210         #  @param theFacesAndShells List of faces and/or shells.
4211         #  @param theName Object name; when specified, this parameter is used
4212         #         for result publication in the study. Otherwise, if automatic
4213         #         publication is switched on, default value is used for result name.
4214         #
4215         #  @return New GEOM.GEOM_Object, containing the created shell.
4216         #
4217         #  @ref tui_creation_shell "Example"
4218         def MakeShell(self, theFacesAndShells, theName=None):
4219             """
4220             Create a shell from the set of faces and shells.
4221
4222             Parameters:
4223                 theFacesAndShells List of faces and/or shells.
4224                 theName Object name; when specified, this parameter is used
4225                         for result publication in the study. Otherwise, if automatic
4226                         publication is switched on, default value is used for result name.
4227
4228             Returns:
4229                 New GEOM.GEOM_Object, containing the created shell.
4230             """
4231             # Example: see GEOM_TestAll.py
4232             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4233             RaiseIfFailed("MakeShell", self.ShapesOp)
4234             self._autoPublish(anObj, theName, "shell")
4235             return anObj
4236
4237         ## Create a solid, bounded by the given shells.
4238         #  @param theShells Sequence of bounding shells.
4239         #  @param theName Object name; when specified, this parameter is used
4240         #         for result publication in the study. Otherwise, if automatic
4241         #         publication is switched on, default value is used for result name.
4242         #
4243         #  @return New GEOM.GEOM_Object, containing the created solid.
4244         #
4245         #  @ref tui_creation_solid "Example"
4246         def MakeSolid(self, theShells, theName=None):
4247             """
4248             Create a solid, bounded by the given shells.
4249
4250             Parameters:
4251                 theShells Sequence of bounding shells.
4252                 theName Object name; when specified, this parameter is used
4253                         for result publication in the study. Otherwise, if automatic
4254                         publication is switched on, default value is used for result name.
4255
4256             Returns:
4257                 New GEOM.GEOM_Object, containing the created solid.
4258             """
4259             # Example: see GEOM_TestAll.py
4260             if len(theShells) == 1:
4261                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4262                 #if len(descr) > 0:
4263                 #    raise RuntimeError, "MakeSolidShells : " + descr
4264                 if descr == "WRN_SHAPE_UNCLOSED":
4265                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4266             anObj = self.ShapesOp.MakeSolidShells(theShells)
4267             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4268             self._autoPublish(anObj, theName, "solid")
4269             return anObj
4270
4271         ## Create a compound of the given shapes.
4272         #  @param theShapes List of shapes to put in compound.
4273         #  @param theName Object name; when specified, this parameter is used
4274         #         for result publication in the study. Otherwise, if automatic
4275         #         publication is switched on, default value is used for result name.
4276         #
4277         #  @return New GEOM.GEOM_Object, containing the created compound.
4278         #
4279         #  @ref tui_creation_compound "Example"
4280         def MakeCompound(self, theShapes, theName=None):
4281             """
4282             Create a compound of the given shapes.
4283
4284             Parameters:
4285                 theShapes List of shapes to put in compound.
4286                 theName Object name; when specified, this parameter is used
4287                         for result publication in the study. Otherwise, if automatic
4288                         publication is switched on, default value is used for result name.
4289
4290             Returns:
4291                 New GEOM.GEOM_Object, containing the created compound.
4292             """
4293             # Example: see GEOM_TestAll.py
4294             anObj = self.ShapesOp.MakeCompound(theShapes)
4295             RaiseIfFailed("MakeCompound", self.ShapesOp)
4296             self._autoPublish(anObj, theName, "compound")
4297             return anObj
4298
4299         # end of l3_advanced
4300         ## @}
4301
4302         ## @addtogroup l2_measure
4303         ## @{
4304
4305         ## Gives quantity of faces in the given shape.
4306         #  @param theShape Shape to count faces of.
4307         #  @return Quantity of faces.
4308         #
4309         #  @ref swig_NumberOf "Example"
4310         def NumberOfFaces(self, theShape):
4311             """
4312             Gives quantity of faces in the given shape.
4313
4314             Parameters:
4315                 theShape Shape to count faces of.
4316
4317             Returns:    
4318                 Quantity of faces.
4319             """
4320             # Example: see GEOM_TestOthers.py
4321             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4322             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4323             return nb_faces
4324
4325         ## Gives quantity of edges in the given shape.
4326         #  @param theShape Shape to count edges of.
4327         #  @return Quantity of edges.
4328         #
4329         #  @ref swig_NumberOf "Example"
4330         def NumberOfEdges(self, theShape):
4331             """
4332             Gives quantity of edges in the given shape.
4333
4334             Parameters:
4335                 theShape Shape to count edges of.
4336
4337             Returns:    
4338                 Quantity of edges.
4339             """
4340             # Example: see GEOM_TestOthers.py
4341             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4342             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4343             return nb_edges
4344
4345         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4346         #  @param theShape Shape to count sub-shapes of.
4347         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4348         #  @return Quantity of sub-shapes of given type.
4349         #
4350         #  @ref swig_NumberOf "Example"
4351         def NumberOfSubShapes(self, theShape, theShapeType):
4352             """
4353             Gives quantity of sub-shapes of type theShapeType in the given shape.
4354
4355             Parameters:
4356                 theShape Shape to count sub-shapes of.
4357                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4358
4359             Returns:
4360                 Quantity of sub-shapes of given type.
4361             """
4362             # Example: see GEOM_TestOthers.py
4363             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4364             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4365             return nb_ss
4366
4367         ## Gives quantity of solids in the given shape.
4368         #  @param theShape Shape to count solids in.
4369         #  @return Quantity of solids.
4370         #
4371         #  @ref swig_NumberOf "Example"
4372         def NumberOfSolids(self, theShape):
4373             """
4374             Gives quantity of solids in the given shape.
4375
4376             Parameters:
4377                 theShape Shape to count solids in.
4378
4379             Returns:
4380                 Quantity of solids.
4381             """
4382             # Example: see GEOM_TestOthers.py
4383             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4384             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4385             return nb_solids
4386
4387         # end of l2_measure
4388         ## @}
4389
4390         ## @addtogroup l3_healing
4391         ## @{
4392
4393         ## Reverses an orientation the given shape.
4394         #  @param theShape Shape to be reversed.
4395         #  @param theName Object name; when specified, this parameter is used
4396         #         for result publication in the study. Otherwise, if automatic
4397         #         publication is switched on, default value is used for result name.
4398         #
4399         #  @return The reversed copy of theShape.
4400         #
4401         #  @ref swig_ChangeOrientation "Example"
4402         def ChangeOrientation(self, theShape, theName=None):
4403             """
4404             Reverses an orientation the given shape.
4405
4406             Parameters:
4407                 theShape Shape to be reversed.
4408                 theName Object name; when specified, this parameter is used
4409                         for result publication in the study. Otherwise, if automatic
4410                         publication is switched on, default value is used for result name.
4411
4412             Returns:   
4413                 The reversed copy of theShape.
4414             """
4415             # Example: see GEOM_TestAll.py
4416             anObj = self.ShapesOp.ChangeOrientation(theShape)
4417             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4418             self._autoPublish(anObj, theName, "reversed")
4419             return anObj
4420
4421         ## See ChangeOrientation() method for details.
4422         #
4423         #  @ref swig_OrientationChange "Example"
4424         def OrientationChange(self, theShape, theName=None):
4425             """
4426             See geompy.ChangeOrientation method for details.
4427             """
4428             # Example: see GEOM_TestOthers.py
4429             # note: auto-publishing is done in self.ChangeOrientation()
4430             anObj = self.ChangeOrientation(theShape, theName)
4431             return anObj
4432
4433         # end of l3_healing
4434         ## @}
4435
4436         ## @addtogroup l4_obtain
4437         ## @{
4438
4439         ## Retrieve all free faces from the given shape.
4440         #  Free face is a face, which is not shared between two shells of the shape.
4441         #  @param theShape Shape to find free faces in.
4442         #  @return List of IDs of all free faces, contained in theShape.
4443         #
4444         #  @ref tui_measurement_tools_page "Example"
4445         def GetFreeFacesIDs(self,theShape):
4446             """
4447             Retrieve all free faces from the given shape.
4448             Free face is a face, which is not shared between two shells of the shape.
4449
4450             Parameters:
4451                 theShape Shape to find free faces in.
4452
4453             Returns:
4454                 List of IDs of all free faces, contained in theShape.
4455             """
4456             # Example: see GEOM_TestOthers.py
4457             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4458             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4459             return anIDs
4460
4461         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4462         #  @param theShape1 Shape to find sub-shapes in.
4463         #  @param theShape2 Shape to find shared sub-shapes with.
4464         #  @param theShapeType Type of sub-shapes to be retrieved.
4465         #  @param theName Object name; when specified, this parameter is used
4466         #         for result publication in the study. Otherwise, if automatic
4467         #         publication is switched on, default value is used for result name.
4468         #
4469         #  @return List of sub-shapes of theShape1, shared with theShape2.
4470         #
4471         #  @ref swig_GetSharedShapes "Example"
4472         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4473             """
4474             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4475
4476             Parameters:
4477                 theShape1 Shape to find sub-shapes in.
4478                 theShape2 Shape to find shared sub-shapes with.
4479                 theShapeType Type of sub-shapes to be retrieved.
4480                 theName Object name; when specified, this parameter is used
4481                         for result publication in the study. Otherwise, if automatic
4482                         publication is switched on, default value is used for result name.
4483
4484             Returns:
4485                 List of sub-shapes of theShape1, shared with theShape2.
4486             """
4487             # Example: see GEOM_TestOthers.py
4488             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4489             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4490             self._autoPublish(aList, theName, "shared")
4491             return aList
4492
4493         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4494         #  @param theShapes Shapes to find common sub-shapes of.
4495         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4496         #  @param theName Object name; when specified, this parameter is used
4497         #         for result publication in the study. Otherwise, if automatic
4498         #         publication is switched on, default value is used for result name.
4499         #
4500         #  @return List of objects, that are sub-shapes of all given shapes.
4501         #
4502         #  @ref swig_GetSharedShapes "Example"
4503         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4504             """
4505             Get all sub-shapes, shared by all shapes in the list theShapes.
4506
4507             Parameters:
4508                 theShapes Shapes to find common sub-shapes of.
4509                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4510                 theName Object name; when specified, this parameter is used
4511                         for result publication in the study. Otherwise, if automatic
4512                         publication is switched on, default value is used for result name.
4513
4514             Returns:    
4515                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4516             """
4517             # Example: see GEOM_TestOthers.py
4518             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4519             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4520             self._autoPublish(aList, theName, "shared")
4521             return aList
4522
4523         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4524         #  situated relatively the specified plane by the certain way,
4525         #  defined through <VAR>theState</VAR> parameter.
4526         #  @param theShape Shape to find sub-shapes of.
4527         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4528         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4529         #                direction and location of the plane to find shapes on.
4530         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4531         #  @param theName Object name; when specified, this parameter is used
4532         #         for result publication in the study. Otherwise, if automatic
4533         #         publication is switched on, default value is used for result name.
4534         #
4535         #  @return List of all found sub-shapes.
4536         #
4537         #  @ref swig_GetShapesOnPlane "Example"
4538         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4539             """
4540             Find in theShape all sub-shapes of type theShapeType,
4541             situated relatively the specified plane by the certain way,
4542             defined through theState parameter.
4543
4544             Parameters:
4545                 theShape Shape to find sub-shapes of.
4546                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4547                 theAx1 Vector (or line, or linear edge), specifying normal
4548                        direction and location of the plane to find shapes on.
4549                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4550                 theName Object name; when specified, this parameter is used
4551                         for result publication in the study. Otherwise, if automatic
4552                         publication is switched on, default value is used for result name.
4553
4554             Returns:
4555                 List of all found sub-shapes.
4556             """
4557             # Example: see GEOM_TestOthers.py
4558             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4559             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4560             self._autoPublish(aList, theName, "shapeOnPlane")
4561             return aList
4562
4563         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4564         #  situated relatively the specified plane by the certain way,
4565         #  defined through <VAR>theState</VAR> parameter.
4566         #  @param theShape Shape to find sub-shapes of.
4567         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4568         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4569         #                direction and location of the plane to find shapes on.
4570         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4571         #
4572         #  @return List of all found sub-shapes indices.
4573         #
4574         #  @ref swig_GetShapesOnPlaneIDs "Example"
4575         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4576             """
4577             Find in theShape all sub-shapes of type theShapeType,
4578             situated relatively the specified plane by the certain way,
4579             defined through theState parameter.
4580
4581             Parameters:
4582                 theShape Shape to find sub-shapes of.
4583                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4584                 theAx1 Vector (or line, or linear edge), specifying normal
4585                        direction and location of the plane to find shapes on.
4586                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4587
4588             Returns:
4589                 List of all found sub-shapes indices.
4590             """
4591             # Example: see GEOM_TestOthers.py
4592             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4593             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4594             return aList
4595
4596         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4597         #  situated relatively the specified plane by the certain way,
4598         #  defined through <VAR>theState</VAR> parameter.
4599         #  @param theShape Shape to find sub-shapes of.
4600         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4601         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4602         #                direction of the plane to find shapes on.
4603         #  @param thePnt Point specifying location of the plane to find shapes on.
4604         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4605         #  @param theName Object name; when specified, this parameter is used
4606         #         for result publication in the study. Otherwise, if automatic
4607         #         publication is switched on, default value is used for result name.
4608         #
4609         #  @return List of all found sub-shapes.
4610         #
4611         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4612         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4613             """
4614             Find in theShape all sub-shapes of type theShapeType,
4615             situated relatively the specified plane by the certain way,
4616             defined through theState parameter.
4617
4618             Parameters:
4619                 theShape Shape to find sub-shapes of.
4620                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4621                 theAx1 Vector (or line, or linear edge), specifying normal
4622                        direction and location of the plane to find shapes on.
4623                 thePnt Point specifying location of the plane to find shapes on.
4624                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4625                 theName Object name; when specified, this parameter is used
4626                         for result publication in the study. Otherwise, if automatic
4627                         publication is switched on, default value is used for result name.
4628
4629             Returns:
4630                 List of all found sub-shapes.
4631             """
4632             # Example: see GEOM_TestOthers.py
4633             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4634                                                                theAx1, thePnt, theState)
4635             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4636             self._autoPublish(aList, theName, "shapeOnPlane")
4637             return aList
4638
4639         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4640         #  situated relatively the specified plane by the certain way,
4641         #  defined through <VAR>theState</VAR> parameter.
4642         #  @param theShape Shape to find sub-shapes of.
4643         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4644         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4645         #                direction of the plane to find shapes on.
4646         #  @param thePnt Point specifying location of the plane to find shapes on.
4647         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4648         #
4649         #  @return List of all found sub-shapes indices.
4650         #
4651         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4652         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4653             """
4654             Find in theShape all sub-shapes of type theShapeType,
4655             situated relatively the specified plane by the certain way,
4656             defined through theState parameter.
4657
4658             Parameters:
4659                 theShape Shape to find sub-shapes of.
4660                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4661                 theAx1 Vector (or line, or linear edge), specifying normal
4662                        direction and location of the plane to find shapes on.
4663                 thePnt Point specifying location of the plane to find shapes on.
4664                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4665
4666             Returns:
4667                 List of all found sub-shapes indices.
4668             """
4669             # Example: see GEOM_TestOthers.py
4670             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4671                                                                   theAx1, thePnt, theState)
4672             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4673             return aList
4674
4675         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4676         #  the specified cylinder by the certain way, defined through \a theState parameter.
4677         #  @param theShape Shape to find sub-shapes of.
4678         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4679         #  @param theAxis Vector (or line, or linear edge), specifying
4680         #                 axis of the cylinder to find shapes on.
4681         #  @param theRadius Radius of the cylinder to find shapes on.
4682         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4683         #  @param theName Object name; when specified, this parameter is used
4684         #         for result publication in the study. Otherwise, if automatic
4685         #         publication is switched on, default value is used for result name.
4686         #
4687         #  @return List of all found sub-shapes.
4688         #
4689         #  @ref swig_GetShapesOnCylinder "Example"
4690         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4691             """
4692             Find in theShape all sub-shapes of type theShapeType, situated relatively
4693             the specified cylinder by the certain way, defined through theState parameter.
4694
4695             Parameters:
4696                 theShape Shape to find sub-shapes of.
4697                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4698                 theAxis Vector (or line, or linear edge), specifying
4699                         axis of the cylinder to find shapes on.
4700                 theRadius Radius of the cylinder to find shapes on.
4701                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4702                 theName Object name; when specified, this parameter is used
4703                         for result publication in the study. Otherwise, if automatic
4704                         publication is switched on, default value is used for result name.
4705
4706             Returns:
4707                 List of all found sub-shapes.
4708             """
4709             # Example: see GEOM_TestOthers.py
4710             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4711             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4712             self._autoPublish(aList, theName, "shapeOnCylinder")
4713             return aList
4714
4715         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4716         #  the specified cylinder by the certain way, defined through \a theState parameter.
4717         #  @param theShape Shape to find sub-shapes of.
4718         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4719         #  @param theAxis Vector (or line, or linear edge), specifying
4720         #                 axis of the cylinder to find shapes on.
4721         #  @param theRadius Radius of the cylinder to find shapes on.
4722         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4723         #
4724         #  @return List of all found sub-shapes indices.
4725         #
4726         #  @ref swig_GetShapesOnCylinderIDs "Example"
4727         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4728             """
4729             Find in theShape all sub-shapes of type theShapeType, situated relatively
4730             the specified cylinder by the certain way, defined through theState parameter.
4731
4732             Parameters:
4733                 theShape Shape to find sub-shapes of.
4734                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4735                 theAxis Vector (or line, or linear edge), specifying
4736                         axis of the cylinder to find shapes on.
4737                 theRadius Radius of the cylinder to find shapes on.
4738                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4739
4740             Returns:
4741                 List of all found sub-shapes indices.
4742             """
4743             # Example: see GEOM_TestOthers.py
4744             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4745             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4746             return aList
4747
4748         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4749         #  the specified cylinder by the certain way, defined through \a theState parameter.
4750         #  @param theShape Shape to find sub-shapes of.
4751         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4752         #  @param theAxis Vector (or line, or linear edge), specifying
4753         #                 axis of the cylinder to find shapes on.
4754         #  @param thePnt Point specifying location of the bottom of the cylinder.
4755         #  @param theRadius Radius of the cylinder to find shapes on.
4756         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4757         #  @param theName Object name; when specified, this parameter is used
4758         #         for result publication in the study. Otherwise, if automatic
4759         #         publication is switched on, default value is used for result name.
4760         #
4761         #  @return List of all found sub-shapes.
4762         #
4763         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4764         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4765             """
4766             Find in theShape all sub-shapes of type theShapeType, situated relatively
4767             the specified cylinder by the certain way, defined through theState parameter.
4768
4769             Parameters:
4770                 theShape Shape to find sub-shapes of.
4771                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4772                 theAxis Vector (or line, or linear edge), specifying
4773                         axis of the cylinder to find shapes on.
4774                 theRadius Radius of the cylinder to find shapes on.
4775                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4776                 theName Object name; when specified, this parameter is used
4777                         for result publication in the study. Otherwise, if automatic
4778                         publication is switched on, default value is used for result name.
4779
4780             Returns:
4781                 List of all found sub-shapes.
4782             """
4783             # Example: see GEOM_TestOthers.py
4784             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4785             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4786             self._autoPublish(aList, theName, "shapeOnCylinder")
4787             return aList
4788
4789         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4790         #  the specified cylinder by the certain way, defined through \a theState parameter.
4791         #  @param theShape Shape to find sub-shapes of.
4792         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4793         #  @param theAxis Vector (or line, or linear edge), specifying
4794         #                 axis of the cylinder to find shapes on.
4795         #  @param thePnt Point specifying location of the bottom of the cylinder.
4796         #  @param theRadius Radius of the cylinder to find shapes on.
4797         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4798         #
4799         #  @return List of all found sub-shapes indices
4800         #
4801         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4802         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4803             """
4804             Find in theShape all sub-shapes of type theShapeType, situated relatively
4805             the specified cylinder by the certain way, defined through theState parameter.
4806
4807             Parameters:
4808                 theShape Shape to find sub-shapes of.
4809                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4810                 theAxis Vector (or line, or linear edge), specifying
4811                         axis of the cylinder to find shapes on.
4812                 theRadius Radius of the cylinder to find shapes on.
4813                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4814
4815             Returns:
4816                 List of all found sub-shapes indices.            
4817             """
4818             # Example: see GEOM_TestOthers.py
4819             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4820             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4821             return aList
4822
4823         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4824         #  the specified sphere by the certain way, defined through \a theState parameter.
4825         #  @param theShape Shape to find sub-shapes of.
4826         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4827         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4828         #  @param theRadius Radius of the sphere to find shapes on.
4829         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4830         #  @param theName Object name; when specified, this parameter is used
4831         #         for result publication in the study. Otherwise, if automatic
4832         #         publication is switched on, default value is used for result name.
4833         #
4834         #  @return List of all found sub-shapes.
4835         #
4836         #  @ref swig_GetShapesOnSphere "Example"
4837         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4838             """
4839             Find in theShape all sub-shapes of type theShapeType, situated relatively
4840             the specified sphere by the certain way, defined through theState parameter.
4841
4842             Parameters:
4843                 theShape Shape to find sub-shapes of.
4844                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4845                 theCenter Point, specifying center of the sphere to find shapes on.
4846                 theRadius Radius of the sphere to find shapes on.
4847                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4848                 theName Object name; when specified, this parameter is used
4849                         for result publication in the study. Otherwise, if automatic
4850                         publication is switched on, default value is used for result name.
4851
4852             Returns:
4853                 List of all found sub-shapes.
4854             """
4855             # Example: see GEOM_TestOthers.py
4856             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4857             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4858             self._autoPublish(aList, theName, "shapeOnSphere")
4859             return aList
4860
4861         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4862         #  the specified sphere by the certain way, defined through \a theState parameter.
4863         #  @param theShape Shape to find sub-shapes of.
4864         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4865         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4866         #  @param theRadius Radius of the sphere to find shapes on.
4867         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4868         #
4869         #  @return List of all found sub-shapes indices.
4870         #
4871         #  @ref swig_GetShapesOnSphereIDs "Example"
4872         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4873             """
4874             Find in theShape all sub-shapes of type theShapeType, situated relatively
4875             the specified sphere by the certain way, defined through theState parameter.
4876
4877             Parameters:
4878                 theShape Shape to find sub-shapes of.
4879                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4880                 theCenter Point, specifying center of the sphere to find shapes on.
4881                 theRadius Radius of the sphere to find shapes on.
4882                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4883
4884             Returns:
4885                 List of all found sub-shapes indices.
4886             """
4887             # Example: see GEOM_TestOthers.py
4888             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4889             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4890             return aList
4891
4892         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4893         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4894         #  @param theShape Shape to find sub-shapes of.
4895         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4896         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4897         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4898         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4899         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4900         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4901         #  @param theName Object name; when specified, this parameter is used
4902         #         for result publication in the study. Otherwise, if automatic
4903         #         publication is switched on, default value is used for result name.
4904         #
4905         #  @return List of all found sub-shapes.
4906         #
4907         #  @ref swig_GetShapesOnQuadrangle "Example"
4908         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4909                                   theTopLeftPoint, theTopRigthPoint,
4910                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4911             """
4912             Find in theShape all sub-shapes of type theShapeType, situated relatively
4913             the specified quadrangle by the certain way, defined through theState parameter.
4914
4915             Parameters:
4916                 theShape Shape to find sub-shapes of.
4917                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4918                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4919                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4920                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4921                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4922                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4923                 theName Object name; when specified, this parameter is used
4924                         for result publication in the study. Otherwise, if automatic
4925                         publication is switched on, default value is used for result name.
4926
4927             Returns:
4928                 List of all found sub-shapes.
4929             """
4930             # Example: see GEOM_TestOthers.py
4931             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4932                                                         theTopLeftPoint, theTopRigthPoint,
4933                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4934             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4935             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4936             return aList
4937
4938         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4939         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4940         #  @param theShape Shape to find sub-shapes of.
4941         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4942         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4943         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4944         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4945         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4946         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4947         #
4948         #  @return List of all found sub-shapes indices.
4949         #
4950         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4951         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4952                                      theTopLeftPoint, theTopRigthPoint,
4953                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4954             """
4955             Find in theShape all sub-shapes of type theShapeType, situated relatively
4956             the specified quadrangle by the certain way, defined through theState parameter.
4957
4958             Parameters:
4959                 theShape Shape to find sub-shapes of.
4960                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4961                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4962                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4963                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4964                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4965                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4966
4967             Returns:
4968                 List of all found sub-shapes indices.
4969             """
4970
4971             # Example: see GEOM_TestOthers.py
4972             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4973                                                            theTopLeftPoint, theTopRigthPoint,
4974                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4975             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4976             return aList
4977
4978         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4979         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4980         #  @param theBox Shape for relative comparing.
4981         #  @param theShape Shape to find sub-shapes of.
4982         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4983         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4984         #  @param theName Object name; when specified, this parameter is used
4985         #         for result publication in the study. Otherwise, if automatic
4986         #         publication is switched on, default value is used for result name.
4987         #
4988         #  @return List of all found sub-shapes.
4989         #
4990         #  @ref swig_GetShapesOnBox "Example"
4991         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
4992             """
4993             Find in theShape all sub-shapes of type theShapeType, situated relatively
4994             the specified theBox by the certain way, defined through theState parameter.
4995
4996             Parameters:
4997                 theBox Shape for relative comparing.
4998                 theShape Shape to find sub-shapes of.
4999                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5000                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5001                 theName Object name; when specified, this parameter is used
5002                         for result publication in the study. Otherwise, if automatic
5003                         publication is switched on, default value is used for result name.
5004
5005             Returns:
5006                 List of all found sub-shapes.
5007             """
5008             # Example: see GEOM_TestOthers.py
5009             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5010             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5011             self._autoPublish(aList, theName, "shapeOnBox")
5012             return aList
5013
5014         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5015         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5016         #  @param theBox Shape for relative comparing.
5017         #  @param theShape Shape to find sub-shapes of.
5018         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5019         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5020         #
5021         #  @return List of all found sub-shapes indices.
5022         #
5023         #  @ref swig_GetShapesOnBoxIDs "Example"
5024         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5025             """
5026             Find in theShape all sub-shapes of type theShapeType, situated relatively
5027             the specified theBox by the certain way, defined through theState parameter.
5028
5029             Parameters:
5030                 theBox Shape for relative comparing.
5031                 theShape Shape to find sub-shapes of.
5032                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5033                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5034
5035             Returns:
5036                 List of all found sub-shapes indices.
5037             """
5038             # Example: see GEOM_TestOthers.py
5039             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5040             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5041             return aList
5042
5043         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5044         #  situated relatively the specified \a theCheckShape by the
5045         #  certain way, defined through \a theState parameter.
5046         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5047         #  @param theShape Shape to find sub-shapes of.
5048         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5049         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5050         #  @param theName Object name; when specified, this parameter is used
5051         #         for result publication in the study. Otherwise, if automatic
5052         #         publication is switched on, default value is used for result name.
5053         #
5054         #  @return List of all found sub-shapes.
5055         #
5056         #  @ref swig_GetShapesOnShape "Example"
5057         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5058             """
5059             Find in theShape all sub-shapes of type theShapeType,
5060             situated relatively the specified theCheckShape by the
5061             certain way, defined through theState parameter.
5062
5063             Parameters:
5064                 theCheckShape Shape for relative comparing. It must be a solid.
5065                 theShape Shape to find sub-shapes of.
5066                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5067                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5068                 theName Object name; when specified, this parameter is used
5069                         for result publication in the study. Otherwise, if automatic
5070                         publication is switched on, default value is used for result name.
5071
5072             Returns:
5073                 List of all found sub-shapes.
5074             """
5075             # Example: see GEOM_TestOthers.py
5076             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5077                                                    theShapeType, theState)
5078             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5079             self._autoPublish(aList, theName, "shapeOnShape")
5080             return aList
5081
5082         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5083         #  situated relatively the specified \a theCheckShape by the
5084         #  certain way, defined through \a theState parameter.
5085         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5086         #  @param theShape Shape to find sub-shapes of.
5087         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5088         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5089         #  @param theName Object name; when specified, this parameter is used
5090         #         for result publication in the study. Otherwise, if automatic
5091         #         publication is switched on, default value is used for result name.
5092         #
5093         #  @return All found sub-shapes as compound.
5094         #
5095         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5096         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5097             """
5098             Find in theShape all sub-shapes of type theShapeType,
5099             situated relatively the specified theCheckShape by the
5100             certain way, defined through theState parameter.
5101
5102             Parameters:
5103                 theCheckShape Shape for relative comparing. It must be a solid.
5104                 theShape Shape to find sub-shapes of.
5105                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5106                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5107                 theName Object name; when specified, this parameter is used
5108                         for result publication in the study. Otherwise, if automatic
5109                         publication is switched on, default value is used for result name.
5110
5111             Returns:
5112                 All found sub-shapes as compound.
5113             """
5114             # Example: see GEOM_TestOthers.py
5115             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5116                                                              theShapeType, theState)
5117             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5118             self._autoPublish(anObj, theName, "shapeOnShape")
5119             return anObj
5120
5121         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5122         #  situated relatively the specified \a theCheckShape by the
5123         #  certain way, defined through \a theState parameter.
5124         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5125         #  @param theShape Shape to find sub-shapes of.
5126         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5127         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5128         #
5129         #  @return List of all found sub-shapes indices.
5130         #
5131         #  @ref swig_GetShapesOnShapeIDs "Example"
5132         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5133             """
5134             Find in theShape all sub-shapes of type theShapeType,
5135             situated relatively the specified theCheckShape by the
5136             certain way, defined through theState parameter.
5137
5138             Parameters:
5139                 theCheckShape Shape for relative comparing. It must be a solid.
5140                 theShape Shape to find sub-shapes of.
5141                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5142                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5143
5144             Returns:
5145                 List of all found sub-shapes indices.
5146             """
5147             # Example: see GEOM_TestOthers.py
5148             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5149                                                       theShapeType, theState)
5150             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5151             return aList
5152
5153         ## Get sub-shape(s) of theShapeWhere, which are
5154         #  coincident with \a theShapeWhat or could be a part of it.
5155         #  @param theShapeWhere Shape to find sub-shapes of.
5156         #  @param theShapeWhat Shape, specifying what to find.
5157         #  @param isNewImplementation implementation of GetInPlace functionality
5158         #             (default = False, old alghorithm based on shape properties)
5159         #  @param theName Object name; when specified, this parameter is used
5160         #         for result publication in the study. Otherwise, if automatic
5161         #         publication is switched on, default value is used for result name.
5162         #
5163         #  @return Group of all found sub-shapes or a single found sub-shape.
5164         #
5165         #  @note This function has a restriction on argument shapes.
5166         #        If \a theShapeWhere has curved parts with significantly
5167         #        outstanding centres (i.e. the mass centre of a part is closer to
5168         #        \a theShapeWhat than to the part), such parts will not be found.
5169         #        @image html get_in_place_lost_part.png
5170         #
5171         #  @ref swig_GetInPlace "Example"
5172         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5173             """
5174             Get sub-shape(s) of theShapeWhere, which are
5175             coincident with  theShapeWhat or could be a part of it.
5176
5177             Parameters:
5178                 theShapeWhere Shape to find sub-shapes of.
5179                 theShapeWhat Shape, specifying what to find.
5180                 isNewImplementation Implementation of GetInPlace functionality
5181                                     (default = False, old alghorithm based on shape properties)
5182                 theName Object name; when specified, this parameter is used
5183                         for result publication in the study. Otherwise, if automatic
5184                         publication is switched on, default value is used for result name.
5185
5186             Returns:
5187                 Group of all found sub-shapes or a single found sub-shape.
5188
5189                 
5190             Note:
5191                 This function has a restriction on argument shapes.
5192                 If theShapeWhere has curved parts with significantly
5193                 outstanding centres (i.e. the mass centre of a part is closer to
5194                 theShapeWhat than to the part), such parts will not be found.
5195             """
5196             # Example: see GEOM_TestOthers.py
5197             anObj = None
5198             if isNewImplementation:
5199                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5200             else:
5201                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5202                 pass
5203             RaiseIfFailed("GetInPlace", self.ShapesOp)
5204             self._autoPublish(anObj, theName, "inplace")
5205             return anObj
5206
5207         ## Get sub-shape(s) of \a theShapeWhere, which are
5208         #  coincident with \a theShapeWhat or could be a part of it.
5209         #
5210         #  Implementation of this method is based on a saved history of an operation,
5211         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5212         #  arguments (an argument shape or a sub-shape of an argument shape).
5213         #  The operation could be the Partition or one of boolean operations,
5214         #  performed on simple shapes (not on compounds).
5215         #
5216         #  @param theShapeWhere Shape to find sub-shapes of.
5217         #  @param theShapeWhat Shape, specifying what to find (must be in the
5218         #                      building history of the ShapeWhere).
5219         #  @param theName Object name; when specified, this parameter is used
5220         #         for result publication in the study. Otherwise, if automatic
5221         #         publication is switched on, default value is used for result name.
5222         #
5223         #  @return Group of all found sub-shapes or a single found sub-shape.
5224         #
5225         #  @ref swig_GetInPlace "Example"
5226         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5227             """
5228             Implementation of this method is based on a saved history of an operation,
5229             produced theShapeWhere. The theShapeWhat must be among this operation's
5230             arguments (an argument shape or a sub-shape of an argument shape).
5231             The operation could be the Partition or one of boolean operations,
5232             performed on simple shapes (not on compounds).
5233
5234             Parameters:
5235                 theShapeWhere Shape to find sub-shapes of.
5236                 theShapeWhat Shape, specifying what to find (must be in the
5237                                 building history of the ShapeWhere).
5238                 theName Object name; when specified, this parameter is used
5239                         for result publication in the study. Otherwise, if automatic
5240                         publication is switched on, default value is used for result name.
5241
5242             Returns:
5243                 Group of all found sub-shapes or a single found sub-shape.
5244             """
5245             # Example: see GEOM_TestOthers.py
5246             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5247             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5248             self._autoPublish(anObj, theName, "inplace")
5249             return anObj
5250
5251         ## Get sub-shape of theShapeWhere, which is
5252         #  equal to \a theShapeWhat.
5253         #  @param theShapeWhere Shape to find sub-shape of.
5254         #  @param theShapeWhat Shape, specifying what to find.
5255         #  @param theName Object name; when specified, this parameter is used
5256         #         for result publication in the study. Otherwise, if automatic
5257         #         publication is switched on, default value is used for result name.
5258         #
5259         #  @return New GEOM.GEOM_Object for found sub-shape.
5260         #
5261         #  @ref swig_GetSame "Example"
5262         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5263             """
5264             Get sub-shape of theShapeWhere, which is
5265             equal to theShapeWhat.
5266
5267             Parameters:
5268                 theShapeWhere Shape to find sub-shape of.
5269                 theShapeWhat Shape, specifying what to find.
5270                 theName Object name; when specified, this parameter is used
5271                         for result publication in the study. Otherwise, if automatic
5272                         publication is switched on, default value is used for result name.
5273
5274             Returns:
5275                 New GEOM.GEOM_Object for found sub-shape.
5276             """
5277             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5278             RaiseIfFailed("GetSame", self.ShapesOp)
5279             self._autoPublish(anObj, theName, "sameShape")
5280             return anObj
5281
5282
5283         ## Get sub-shape indices of theShapeWhere, which is
5284         #  equal to \a theShapeWhat.
5285         #  @param theShapeWhere Shape to find sub-shape of.
5286         #  @param theShapeWhat Shape, specifying what to find.
5287         #  @return List of all found sub-shapes indices. 
5288         #
5289         #  @ref swig_GetSame "Example"
5290         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5291             """
5292             Get sub-shape indices of theShapeWhere, which is
5293             equal to theShapeWhat.
5294
5295             Parameters:
5296                 theShapeWhere Shape to find sub-shape of.
5297                 theShapeWhat Shape, specifying what to find.
5298
5299             Returns:
5300                 List of all found sub-shapes indices.
5301             """
5302             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5303             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5304             return anObj
5305
5306
5307         # end of l4_obtain
5308         ## @}
5309
5310         ## @addtogroup l4_access
5311         ## @{
5312
5313         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5314         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5315         #  @param aShape Shape to get sub-shape of.
5316         #  @param ListOfID List of sub-shapes indices.
5317         #  @param theName Object name; when specified, this parameter is used
5318         #         for result publication in the study. Otherwise, if automatic
5319         #         publication is switched on, default value is used for result name.
5320         #
5321         #  @return Found sub-shape.
5322         #
5323         #  @ref swig_all_decompose "Example"
5324         def GetSubShape(self, aShape, ListOfID, theName=None):
5325             """
5326             Obtain a composite sub-shape of aShape, composed from sub-shapes
5327             of aShape, selected by their unique IDs inside aShape
5328
5329             Parameters:
5330                 aShape Shape to get sub-shape of.
5331                 ListOfID List of sub-shapes indices.
5332                 theName Object name; when specified, this parameter is used
5333                         for result publication in the study. Otherwise, if automatic
5334                         publication is switched on, default value is used for result name.
5335
5336             Returns:
5337                 Found sub-shape.
5338             """
5339             # Example: see GEOM_TestAll.py
5340             anObj = self.AddSubShape(aShape,ListOfID)
5341             self._autoPublish(anObj, theName, "subshape")
5342             return anObj
5343
5344         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5345         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5346         #  @param aShape Shape to get sub-shape of.
5347         #  @param aSubShape Sub-shapes of aShape.
5348         #  @return ID of found sub-shape.
5349         #
5350         #  @ref swig_all_decompose "Example"
5351         def GetSubShapeID(self, aShape, aSubShape):
5352             """
5353             Obtain unique ID of sub-shape aSubShape inside aShape
5354             of aShape, selected by their unique IDs inside aShape
5355
5356             Parameters:
5357                aShape Shape to get sub-shape of.
5358                aSubShape Sub-shapes of aShape.
5359
5360             Returns:
5361                ID of found sub-shape.
5362             """
5363             # Example: see GEOM_TestAll.py
5364             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5365             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5366             return anID
5367             
5368         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5369         #  This function is provided for performance purpose. The complexity is O(n) with n
5370         #  the number of subobjects of aShape
5371         #  @param aShape Shape to get sub-shape of.
5372         #  @param aSubShapes Sub-shapes of aShape.
5373         #  @return list of IDs of found sub-shapes.
5374         #
5375         #  @ref swig_all_decompose "Example"
5376         def GetSubShapesIDs(self, aShape, aSubShapes):
5377             """
5378             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5379             This function is provided for performance purpose. The complexity is O(n) with n
5380             the number of subobjects of aShape
5381
5382             Parameters:
5383                aShape Shape to get sub-shape of.
5384                aSubShapes Sub-shapes of aShape.
5385
5386             Returns:
5387                List of IDs of found sub-shape.
5388             """
5389             # Example: see GEOM_TestAll.py
5390             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5391             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5392             return anIDs
5393
5394         # end of l4_access
5395         ## @}
5396
5397         ## @addtogroup l4_decompose
5398         ## @{
5399
5400         ## Get all sub-shapes and groups of \a theShape,
5401         #  that were created already by any other methods.
5402         #  @param theShape Any shape.
5403         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5404         #                       returned, else all found sub-shapes and groups.
5405         #  @return List of existing sub-objects of \a theShape.
5406         #
5407         #  @ref swig_all_decompose "Example"
5408         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5409             """
5410             Get all sub-shapes and groups of theShape,
5411             that were created already by any other methods.
5412
5413             Parameters:
5414                 theShape Any shape.
5415                 theGroupsOnly If this parameter is TRUE, only groups will be
5416                                  returned, else all found sub-shapes and groups.
5417
5418             Returns:
5419                 List of existing sub-objects of theShape.
5420             """
5421             # Example: see GEOM_TestAll.py
5422             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5423             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5424             return ListObj
5425
5426         ## Get all groups of \a theShape,
5427         #  that were created already by any other methods.
5428         #  @param theShape Any shape.
5429         #  @return List of existing groups of \a theShape.
5430         #
5431         #  @ref swig_all_decompose "Example"
5432         def GetGroups(self, theShape):
5433             """
5434             Get all groups of theShape,
5435             that were created already by any other methods.
5436
5437             Parameters:
5438                 theShape Any shape.
5439
5440             Returns:
5441                 List of existing groups of theShape.
5442             """
5443             # Example: see GEOM_TestAll.py
5444             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5445             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5446             return ListObj
5447
5448         ## Explode a shape on sub-shapes of a given type.
5449         #  If the shape itself matches the type, it is also returned.
5450         #  @param aShape Shape to be exploded.
5451         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5452         #  @param theName Object name; when specified, this parameter is used
5453         #         for result publication in the study. Otherwise, if automatic
5454         #         publication is switched on, default value is used for result name.
5455         #
5456         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5457         #
5458         #  @ref swig_all_decompose "Example"
5459         def SubShapeAll(self, aShape, aType, theName=None):
5460             """
5461             Explode a shape on sub-shapes of a given type.
5462             If the shape itself matches the type, it is also returned.
5463
5464             Parameters:
5465                 aShape Shape to be exploded.
5466                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5467                 theName Object name; when specified, this parameter is used
5468                         for result publication in the study. Otherwise, if automatic
5469                         publication is switched on, default value is used for result name.
5470
5471             Returns:
5472                 List of sub-shapes of type theShapeType, contained in theShape.
5473             """
5474             # Example: see GEOM_TestAll.py
5475             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5476             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5477             self._autoPublish(ListObj, theName, "subshape")
5478             return ListObj
5479
5480         ## Explode a shape on sub-shapes of a given type.
5481         #  @param aShape Shape to be exploded.
5482         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5483         #  @return List of IDs of sub-shapes.
5484         #
5485         #  @ref swig_all_decompose "Example"
5486         def SubShapeAllIDs(self, aShape, aType):
5487             """
5488             Explode a shape on sub-shapes of a given type.
5489
5490             Parameters:
5491                 aShape Shape to be exploded (see geompy.ShapeType)
5492                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5493
5494             Returns:
5495                 List of IDs of sub-shapes.
5496             """
5497             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5498             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5499             return ListObj
5500
5501         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5502         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5503         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5504         #  @param aShape Shape to get sub-shape of.
5505         #  @param ListOfInd List of sub-shapes indices.
5506         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5507         #  @param theName Object name; when specified, this parameter is used
5508         #         for result publication in the study. Otherwise, if automatic
5509         #         publication is switched on, default value is used for result name.
5510         #
5511         #  @return A compound of sub-shapes of aShape.
5512         #
5513         #  @ref swig_all_decompose "Example"
5514         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5515             """
5516             Obtain a compound of sub-shapes of aShape,
5517             selected by their indices in list of all sub-shapes of type aType.
5518             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5519             
5520             Parameters:
5521                 aShape Shape to get sub-shape of.
5522                 ListOfID List of sub-shapes indices.
5523                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5524                 theName Object name; when specified, this parameter is used
5525                         for result publication in the study. Otherwise, if automatic
5526                         publication is switched on, default value is used for result name.
5527
5528             Returns:
5529                 A compound of sub-shapes of aShape.
5530             """
5531             # Example: see GEOM_TestAll.py
5532             ListOfIDs = []
5533             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5534             for ind in ListOfInd:
5535                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5536             # note: auto-publishing is done in self.GetSubShape()
5537             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5538             return anObj
5539
5540         ## Explode a shape on sub-shapes of a given type.
5541         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5542         #  If the shape itself matches the type, it is also returned.
5543         #  @param aShape Shape to be exploded.
5544         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5545         #  @param theName Object name; when specified, this parameter is used
5546         #         for result publication in the study. Otherwise, if automatic
5547         #         publication is switched on, default value is used for result name.
5548         #
5549         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5550         #
5551         #  @ref swig_SubShapeAllSorted "Example"
5552         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5553             """
5554             Explode a shape on sub-shapes of a given type.
5555             Sub-shapes will be sorted by coordinates of their gravity centers.
5556             If the shape itself matches the type, it is also returned.
5557
5558             Parameters: 
5559                 aShape Shape to be exploded.
5560                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5561                 theName Object name; when specified, this parameter is used
5562                         for result publication in the study. Otherwise, if automatic
5563                         publication is switched on, default value is used for result name.
5564
5565             Returns: 
5566                 List of sub-shapes of type theShapeType, contained in theShape.
5567             """
5568             # Example: see GEOM_TestAll.py
5569             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5570             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5571             self._autoPublish(ListObj, theName, "subshape")
5572             return ListObj
5573
5574         ## Explode a shape on sub-shapes of a given type.
5575         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5576         #  @param aShape Shape to be exploded.
5577         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5578         #  @return List of IDs of sub-shapes.
5579         #
5580         #  @ref swig_all_decompose "Example"
5581         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5582             """
5583             Explode a shape on sub-shapes of a given type.
5584             Sub-shapes will be sorted by coordinates of their gravity centers.
5585
5586             Parameters: 
5587                 aShape Shape to be exploded.
5588                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5589
5590             Returns: 
5591                 List of IDs of sub-shapes.
5592             """
5593             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5594             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5595             return ListIDs
5596
5597         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5598         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5599         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5600         #  @param aShape Shape to get sub-shape of.
5601         #  @param ListOfInd List of sub-shapes indices.
5602         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5603         #  @param theName Object name; when specified, this parameter is used
5604         #         for result publication in the study. Otherwise, if automatic
5605         #         publication is switched on, default value is used for result name.
5606         #
5607         #  @return A compound of sub-shapes of aShape.
5608         #
5609         #  @ref swig_all_decompose "Example"
5610         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5611             """
5612             Obtain a compound of sub-shapes of aShape,
5613             selected by they indices in sorted list of all sub-shapes of type aType.
5614             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5615
5616             Parameters:
5617                 aShape Shape to get sub-shape of.
5618                 ListOfID List of sub-shapes indices.
5619                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5620                 theName Object name; when specified, this parameter is used
5621                         for result publication in the study. Otherwise, if automatic
5622                         publication is switched on, default value is used for result name.
5623
5624             Returns:
5625                 A compound of sub-shapes of aShape.
5626             """
5627             # Example: see GEOM_TestAll.py
5628             ListOfIDs = []
5629             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5630             for ind in ListOfInd:
5631                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5632             # note: auto-publishing is done in self.GetSubShape()
5633             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5634             return anObj
5635
5636         ## Extract shapes (excluding the main shape) of given type.
5637         #  @param aShape The shape.
5638         #  @param aType  The shape type (see ShapeType())
5639         #  @param isSorted Boolean flag to switch sorting on/off.
5640         #  @param theName Object name; when specified, this parameter is used
5641         #         for result publication in the study. Otherwise, if automatic
5642         #         publication is switched on, default value is used for result name.
5643         #
5644         #  @return List of sub-shapes of type aType, contained in aShape.
5645         #
5646         #  @ref swig_FilletChamfer "Example"
5647         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5648             """
5649             Extract shapes (excluding the main shape) of given type.
5650
5651             Parameters:
5652                 aShape The shape.
5653                 aType  The shape type (see geompy.ShapeType)
5654                 isSorted Boolean flag to switch sorting on/off.
5655                 theName Object name; when specified, this parameter is used
5656                         for result publication in the study. Otherwise, if automatic
5657                         publication is switched on, default value is used for result name.
5658
5659             Returns:     
5660                 List of sub-shapes of type aType, contained in aShape.
5661             """
5662             # Example: see GEOM_TestAll.py
5663             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5664             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5665             self._autoPublish(ListObj, theName, "subshape")
5666             return ListObj
5667
5668         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5669         #  @param aShape Main shape.
5670         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5671         #  @param theName Object name; when specified, this parameter is used
5672         #         for result publication in the study. Otherwise, if automatic
5673         #         publication is switched on, default value is used for result name.
5674         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5675         #
5676         #  @ref swig_all_decompose "Example"
5677         def SubShapes(self, aShape, anIDs, theName=None):
5678             """
5679             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5680
5681             Parameters:
5682                 aShape Main shape.
5683                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5684                 theName Object name; when specified, this parameter is used
5685                         for result publication in the study. Otherwise, if automatic
5686                         publication is switched on, default value is used for result name.
5687
5688             Returns:      
5689                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5690             """
5691             # Example: see GEOM_TestAll.py
5692             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5693             RaiseIfFailed("SubShapes", self.ShapesOp)
5694             self._autoPublish(ListObj, theName, "subshape")
5695             return ListObj
5696
5697         # end of l4_decompose
5698         ## @}
5699
5700         ## @addtogroup l4_decompose_d
5701         ## @{
5702
5703         ## Deprecated method
5704         #  It works like SubShapeAllSortedCentres(), but wrongly
5705         #  defines centres of faces, shells and solids.
5706         def SubShapeAllSorted(self, aShape, aType, theName=None):
5707             """
5708             Deprecated method
5709             It works like geompy.SubShapeAllSortedCentres, but wrongly
5710             defines centres of faces, shells and solids.
5711             """
5712             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5713             RaiseIfFailed("MakeExplode", self.ShapesOp)
5714             self._autoPublish(ListObj, theName, "subshape")
5715             return ListObj
5716
5717         ## Deprecated method
5718         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5719         #  defines centres of faces, shells and solids.
5720         def SubShapeAllSortedIDs(self, aShape, aType):
5721             """
5722             Deprecated method
5723             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5724             defines centres of faces, shells and solids.
5725             """
5726             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5727             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5728             return ListIDs
5729
5730         ## Deprecated method
5731         #  It works like SubShapeSortedCentres(), but has a bug
5732         #  (wrongly defines centres of faces, shells and solids).
5733         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5734             """
5735             Deprecated method
5736             It works like geompy.SubShapeSortedCentres, but has a bug
5737             (wrongly defines centres of faces, shells and solids).
5738             """
5739             ListOfIDs = []
5740             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5741             for ind in ListOfInd:
5742                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5743             # note: auto-publishing is done in self.GetSubShape()
5744             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5745             return anObj
5746
5747         # end of l4_decompose_d
5748         ## @}
5749
5750         ## @addtogroup l3_healing
5751         ## @{
5752
5753         ## Apply a sequence of Shape Healing operators to the given object.
5754         #  @param theShape Shape to be processed.
5755         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5756         #  @param theParameters List of names of parameters
5757         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5758         #  @param theValues List of values of parameters, in the same order
5759         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5760         #  @param theName Object name; when specified, this parameter is used
5761         #         for result publication in the study. Otherwise, if automatic
5762         #         publication is switched on, default value is used for result name.
5763         #
5764         #  <b> Operators and Parameters: </b> \n
5765         #
5766         #  * \b FixShape - corrects invalid shapes. \n
5767         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5768         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5769         #
5770         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5771         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5772         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5773         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5774         #
5775         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5776         #    surfaces in segments using a certain angle. \n
5777         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5778         #    if Angle=180, four if Angle=90, etc). \n
5779         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5780         #
5781         #  * \b SplitClosedFaces - splits closed faces in segments.
5782         #    The number of segments depends on the number of splitting points.\n
5783         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5784         #
5785         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5786         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5787         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5788         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5789         #   This and the previous parameters can take the following values:\n
5790         #   \b Parametric \b Continuity \n
5791         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5792         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5793         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5794         #    ruling out sharp edges).\n
5795         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5796         #       are of the same magnitude).\n
5797         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5798         #    or surfaces (d/du C(u)) are the same at junction. \n
5799         #   \b Geometric \b Continuity \n
5800         #   \b G1: first derivatives are proportional at junction.\n
5801         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5802         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5803         #   \b G2: first and second derivatives are proportional at junction.
5804         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5805         #    continuity requires that the underlying parameterization was continuous as well.
5806         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5807         #
5808         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5809         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5810         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5811         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5812         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5813         #       with the specified parameters.\n
5814         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5815         #       with the specified parameters.\n
5816         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5817         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5818         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5819         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5820         #
5821         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5822         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5823         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5824         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5825         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5826         #
5827         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5828         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5829         #
5830         #
5831         #  @return New GEOM.GEOM_Object, containing processed shape.
5832         #
5833         #  \n @ref tui_shape_processing "Example"
5834         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5835             """
5836             Apply a sequence of Shape Healing operators to the given object.
5837
5838             Parameters:
5839                 theShape Shape to be processed.
5840                 theValues List of values of parameters, in the same order
5841                           as parameters are listed in theParameters list.
5842                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5843                 theParameters List of names of parameters
5844                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5845                 theName Object name; when specified, this parameter is used
5846                         for result publication in the study. Otherwise, if automatic
5847                         publication is switched on, default value is used for result name.
5848
5849                 Operators and Parameters:
5850
5851                  * FixShape - corrects invalid shapes.
5852                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5853                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5854                  * FixFaceSize - removes small faces, such as spots and strips.
5855                      * FixFaceSize.Tolerance - defines minimum possible face size.
5856                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5857                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5858                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5859                                 in segments using a certain angle.
5860                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5861                                           if Angle=180, four if Angle=90, etc).
5862                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5863                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5864                                       splitting points.
5865                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5866                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5867                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5868                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5869                      * SplitContinuity.CurveContinuity - required continuity for curves.
5870                        This and the previous parameters can take the following values:
5871                        
5872                        Parametric Continuity:
5873                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5874                                                    coincidental. The curves or surfaces may still meet at an angle,
5875                                                    giving rise to a sharp corner or edge).
5876                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5877                                                    are parallel, ruling out sharp edges).
5878                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5879                                                   or surfaces are of the same magnitude).
5880                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5881                           curves or surfaces (d/du C(u)) are the same at junction.
5882                           
5883                        Geometric Continuity:
5884                        G1: first derivatives are proportional at junction.
5885                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5886                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5887                        G2: first and second derivatives are proportional at junction. As the names imply,
5888                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5889                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5890                            geometric continuity of order n, but not vice-versa.
5891                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5892                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5893                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5894                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5895                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5896                                                         the specified parameters.
5897                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5898                                                         the specified parameters.
5899                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5900                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5901                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5902                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5903                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5904                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5905                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5906                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5907                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5908                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5909                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5910
5911             Returns:
5912                 New GEOM.GEOM_Object, containing processed shape.
5913
5914             Note: For more information look through SALOME Geometry User's Guide->
5915                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5916             """
5917             # Example: see GEOM_TestHealing.py
5918             theValues,Parameters = ParseList(theValues)
5919             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5920             # To avoid script failure in case of good argument shape
5921             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5922                 return theShape
5923             RaiseIfFailed("ProcessShape", self.HealOp)
5924             for string in (theOperators + theParameters):
5925                 Parameters = ":" + Parameters
5926                 pass
5927             anObj.SetParameters(Parameters)
5928             self._autoPublish(anObj, theName, "healed")
5929             return anObj
5930
5931         ## Remove faces from the given object (shape).
5932         #  @param theObject Shape to be processed.
5933         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5934         #                  removes ALL faces of the given object.
5935         #  @param theName Object name; when specified, this parameter is used
5936         #         for result publication in the study. Otherwise, if automatic
5937         #         publication is switched on, default value is used for result name.
5938         #
5939         #  @return New GEOM.GEOM_Object, containing processed shape.
5940         #
5941         #  @ref tui_suppress_faces "Example"
5942         def SuppressFaces(self, theObject, theFaces, theName=None):
5943             """
5944             Remove faces from the given object (shape).
5945
5946             Parameters:
5947                 theObject Shape to be processed.
5948                 theFaces Indices of faces to be removed, if EMPTY then the method
5949                          removes ALL faces of the given object.
5950                 theName Object name; when specified, this parameter is used
5951                         for result publication in the study. Otherwise, if automatic
5952                         publication is switched on, default value is used for result name.
5953
5954             Returns:
5955                 New GEOM.GEOM_Object, containing processed shape.
5956             """
5957             # Example: see GEOM_TestHealing.py
5958             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5959             RaiseIfFailed("SuppressFaces", self.HealOp)
5960             self._autoPublish(anObj, theName, "suppressFaces")
5961             return anObj
5962
5963         ## Sewing of some shapes into single shape.
5964         #  @param ListShape Shapes to be processed.
5965         #  @param theTolerance Required tolerance value.
5966         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5967         #  @param theName Object name; when specified, this parameter is used
5968         #         for result publication in the study. Otherwise, if automatic
5969         #         publication is switched on, default value is used for result name.
5970         #
5971         #  @return New GEOM.GEOM_Object, containing processed shape.
5972         #
5973         #  @ref tui_sewing "Example"
5974         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
5975             """
5976             Sewing of some shapes into single shape.
5977
5978             Parameters:
5979                 ListShape Shapes to be processed.
5980                 theTolerance Required tolerance value.
5981                 AllowNonManifold Flag that allows non-manifold sewing.
5982                 theName Object name; when specified, this parameter is used
5983                         for result publication in the study. Otherwise, if automatic
5984                         publication is switched on, default value is used for result name.
5985
5986             Returns:
5987                 New GEOM.GEOM_Object, containing processed shape.
5988             """
5989             # Example: see GEOM_TestHealing.py
5990             comp = self.MakeCompound(ListShape)
5991             # note: auto-publishing is done in self.Sew()
5992             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
5993             return anObj
5994
5995         ## Sewing of the given object.
5996         #  @param theObject Shape to be processed.
5997         #  @param theTolerance Required tolerance value.
5998         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5999         #  @param theName Object name; when specified, this parameter is used
6000         #         for result publication in the study. Otherwise, if automatic
6001         #         publication is switched on, default value is used for result name.
6002         #
6003         #  @return New GEOM.GEOM_Object, containing processed shape.
6004         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6005             """
6006             Sewing of the given object.
6007
6008             Parameters:
6009                 theObject Shape to be processed.
6010                 theTolerance Required tolerance value.
6011                 AllowNonManifold Flag that allows non-manifold sewing.
6012                 theName Object name; when specified, this parameter is used
6013                         for result publication in the study. Otherwise, if automatic
6014                         publication is switched on, default value is used for result name.
6015
6016             Returns:
6017                 New GEOM.GEOM_Object, containing processed shape.
6018             """
6019             # Example: see MakeSewing() above
6020             theTolerance,Parameters = ParseParameters(theTolerance)
6021             if AllowNonManifold:
6022                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6023             else:
6024                 anObj = self.HealOp.Sew(theObject, theTolerance)
6025             RaiseIfFailed("Sew", self.HealOp)
6026             anObj.SetParameters(Parameters)
6027             self._autoPublish(anObj, theName, "sewed")
6028             return anObj
6029
6030         ## Rebuild the topology of theCompound of solids by removing
6031         #  of the faces that are shared by several solids.
6032         #  @param theCompound Shape to be processed.
6033         #  @param theName Object name; when specified, this parameter is used
6034         #         for result publication in the study. Otherwise, if automatic
6035         #         publication is switched on, default value is used for result name.
6036         #
6037         #  @return New GEOM.GEOM_Object, containing processed shape.
6038         #
6039         #  @ref tui_remove_webs "Example"
6040         def RemoveInternalFaces (self, theCompound, theName=None):
6041             """
6042             Rebuild the topology of theCompound of solids by removing
6043             of the faces that are shared by several solids.
6044
6045             Parameters:
6046                 theCompound Shape to be processed.
6047                 theName Object name; when specified, this parameter is used
6048                         for result publication in the study. Otherwise, if automatic
6049                         publication is switched on, default value is used for result name.
6050
6051             Returns:
6052                 New GEOM.GEOM_Object, containing processed shape.
6053             """
6054             # Example: see GEOM_TestHealing.py
6055             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6056             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6057             self._autoPublish(anObj, theName, "removeWebs")
6058             return anObj
6059
6060         ## Remove internal wires and edges from the given object (face).
6061         #  @param theObject Shape to be processed.
6062         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6063         #                  removes ALL internal wires of the given object.
6064         #  @param theName Object name; when specified, this parameter is used
6065         #         for result publication in the study. Otherwise, if automatic
6066         #         publication is switched on, default value is used for result name.
6067         #
6068         #  @return New GEOM.GEOM_Object, containing processed shape.
6069         #
6070         #  @ref tui_suppress_internal_wires "Example"
6071         def SuppressInternalWires(self, theObject, theWires, theName=None):
6072             """
6073             Remove internal wires and edges from the given object (face).
6074
6075             Parameters:
6076                 theObject Shape to be processed.
6077                 theWires Indices of wires to be removed, if EMPTY then the method
6078                          removes ALL internal wires of the given object.
6079                 theName Object name; when specified, this parameter is used
6080                         for result publication in the study. Otherwise, if automatic
6081                         publication is switched on, default value is used for result name.
6082
6083             Returns:                
6084                 New GEOM.GEOM_Object, containing processed shape.
6085             """
6086             # Example: see GEOM_TestHealing.py
6087             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6088             RaiseIfFailed("RemoveIntWires", self.HealOp)
6089             self._autoPublish(anObj, theName, "suppressWires")
6090             return anObj
6091
6092         ## Remove internal closed contours (holes) from the given object.
6093         #  @param theObject Shape to be processed.
6094         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6095         #                  removes ALL internal holes of the given object
6096         #  @param theName Object name; when specified, this parameter is used
6097         #         for result publication in the study. Otherwise, if automatic
6098         #         publication is switched on, default value is used for result name.
6099         #
6100         #  @return New GEOM.GEOM_Object, containing processed shape.
6101         #
6102         #  @ref tui_suppress_holes "Example"
6103         def SuppressHoles(self, theObject, theWires, theName=None):
6104             """
6105             Remove internal closed contours (holes) from the given object.
6106
6107             Parameters:
6108                 theObject Shape to be processed.
6109                 theWires Indices of wires to be removed, if EMPTY then the method
6110                          removes ALL internal holes of the given object
6111                 theName Object name; when specified, this parameter is used
6112                         for result publication in the study. Otherwise, if automatic
6113                         publication is switched on, default value is used for result name.
6114
6115             Returns:    
6116                 New GEOM.GEOM_Object, containing processed shape.
6117             """
6118             # Example: see GEOM_TestHealing.py
6119             anObj = self.HealOp.FillHoles(theObject, theWires)
6120             RaiseIfFailed("FillHoles", self.HealOp)
6121             self._autoPublish(anObj, theName, "suppressHoles")
6122             return anObj
6123
6124         ## Close an open wire.
6125         #  @param theObject Shape to be processed.
6126         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6127         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6128         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6129         #                        If False : closure by creation of an edge between ends.
6130         #  @param theName Object name; when specified, this parameter is used
6131         #         for result publication in the study. Otherwise, if automatic
6132         #         publication is switched on, default value is used for result name.
6133         #
6134         #  @return New GEOM.GEOM_Object, containing processed shape.
6135         #
6136         #  @ref tui_close_contour "Example"
6137         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6138             """
6139             Close an open wire.
6140
6141             Parameters: 
6142                 theObject Shape to be processed.
6143                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6144                          if [ ], then theObject itself is a wire.
6145                 isCommonVertex If True  : closure by creation of a common vertex,
6146                                If False : closure by creation of an edge between ends.
6147                 theName Object name; when specified, this parameter is used
6148                         for result publication in the study. Otherwise, if automatic
6149                         publication is switched on, default value is used for result name.
6150
6151             Returns:                      
6152                 New GEOM.GEOM_Object, containing processed shape. 
6153             """
6154             # Example: see GEOM_TestHealing.py
6155             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6156             RaiseIfFailed("CloseContour", self.HealOp)
6157             self._autoPublish(anObj, theName, "closeContour")
6158             return anObj
6159
6160         ## Addition of a point to a given edge object.
6161         #  @param theObject Shape to be processed.
6162         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6163         #                      if -1, then theObject itself is the edge.
6164         #  @param theValue Value of parameter on edge or length parameter,
6165         #                  depending on \a isByParameter.
6166         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6167         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6168         #  @param theName Object name; when specified, this parameter is used
6169         #         for result publication in the study. Otherwise, if automatic
6170         #         publication is switched on, default value is used for result name.
6171         #
6172         #  @return New GEOM.GEOM_Object, containing processed shape.
6173         #
6174         #  @ref tui_add_point_on_edge "Example"
6175         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6176             """
6177             Addition of a point to a given edge object.
6178
6179             Parameters: 
6180                 theObject Shape to be processed.
6181                 theEdgeIndex Index of edge to be divided within theObject's shape,
6182                              if -1, then theObject itself is the edge.
6183                 theValue Value of parameter on edge or length parameter,
6184                          depending on isByParameter.
6185                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6186                               if FALSE : theValue is treated as a length parameter [0..1]
6187                 theName Object name; when specified, this parameter is used
6188                         for result publication in the study. Otherwise, if automatic
6189                         publication is switched on, default value is used for result name.
6190
6191             Returns:  
6192                 New GEOM.GEOM_Object, containing processed shape.
6193             """
6194             # Example: see GEOM_TestHealing.py
6195             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6196             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6197             RaiseIfFailed("DivideEdge", self.HealOp)
6198             anObj.SetParameters(Parameters)
6199             self._autoPublish(anObj, theName, "divideEdge")
6200             return anObj
6201
6202         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6203         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6204         #  @param theVertices A list of vertices to suppress. If the list
6205         #                     is empty, all vertices in a wire will be assumed.
6206         #  @param theName Object name; when specified, this parameter is used
6207         #         for result publication in the study. Otherwise, if automatic
6208         #         publication is switched on, default value is used for result name.
6209         #
6210         #  @return New GEOM.GEOM_Object with modified wire.
6211         #
6212         #  @ref tui_fuse_collinear_edges "Example"
6213         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6214             """
6215             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6216
6217             Parameters: 
6218                 theWire Wire to minimize the number of C1 continuous edges in.
6219                 theVertices A list of vertices to suppress. If the list
6220                             is empty, all vertices in a wire will be assumed.
6221                 theName Object name; when specified, this parameter is used
6222                         for result publication in the study. Otherwise, if automatic
6223                         publication is switched on, default value is used for result name.
6224
6225             Returns:  
6226                 New GEOM.GEOM_Object with modified wire.
6227             """
6228             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6229             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6230             self._autoPublish(anObj, theName, "fuseEdges")
6231             return anObj
6232
6233         ## Change orientation of the given object. Updates given shape.
6234         #  @param theObject Shape to be processed.
6235         #  @return Updated <var>theObject</var>
6236         #
6237         #  @ref swig_todo "Example"
6238         def ChangeOrientationShell(self,theObject):
6239             """
6240             Change orientation of the given object. Updates given shape.
6241
6242             Parameters: 
6243                 theObject Shape to be processed.
6244
6245             Returns:  
6246                 Updated theObject
6247             """
6248             theObject = self.HealOp.ChangeOrientation(theObject)
6249             RaiseIfFailed("ChangeOrientation", self.HealOp)
6250             pass
6251
6252         ## Change orientation of the given object.
6253         #  @param theObject Shape to be processed.
6254         #  @param theName Object name; when specified, this parameter is used
6255         #         for result publication in the study. Otherwise, if automatic
6256         #         publication is switched on, default value is used for result name.
6257         #
6258         #  @return New GEOM.GEOM_Object, containing processed shape.
6259         #
6260         #  @ref swig_todo "Example"
6261         def ChangeOrientationShellCopy(self, theObject, theName=None):
6262             """
6263             Change orientation of the given object.
6264
6265             Parameters:
6266                 theObject Shape to be processed.
6267                 theName Object name; when specified, this parameter is used
6268                         for result publication in the study. Otherwise, if automatic
6269                         publication is switched on, default value is used for result name.
6270
6271             Returns:   
6272                 New GEOM.GEOM_Object, containing processed shape.
6273             """
6274             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6275             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6276             self._autoPublish(anObj, theName, "reversed")
6277             return anObj
6278
6279         ## Try to limit tolerance of the given object by value \a theTolerance.
6280         #  @param theObject Shape to be processed.
6281         #  @param theTolerance Required tolerance value.
6282         #  @param theName Object name; when specified, this parameter is used
6283         #         for result publication in the study. Otherwise, if automatic
6284         #         publication is switched on, default value is used for result name.
6285         #
6286         #  @return New GEOM.GEOM_Object, containing processed shape.
6287         #
6288         #  @ref tui_limit_tolerance "Example"
6289         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6290             """
6291             Try to limit tolerance of the given object by value theTolerance.
6292
6293             Parameters:
6294                 theObject Shape to be processed.
6295                 theTolerance Required tolerance value.
6296                 theName Object name; when specified, this parameter is used
6297                         for result publication in the study. Otherwise, if automatic
6298                         publication is switched on, default value is used for result name.
6299
6300             Returns:   
6301                 New GEOM.GEOM_Object, containing processed shape.
6302             """
6303             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6304             RaiseIfFailed("LimitTolerance", self.HealOp)
6305             self._autoPublish(anObj, theName, "limitTolerance")
6306             return anObj
6307
6308         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6309         #  that constitute a free boundary of the given shape.
6310         #  @param theObject Shape to get free boundary of.
6311         #  @param theName Object name; when specified, this parameter is used
6312         #         for result publication in the study. Otherwise, if automatic
6313         #         publication is switched on, default value is used for result name.
6314         #
6315         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6316         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6317         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6318         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6319         #
6320         #  @ref tui_measurement_tools_page "Example"
6321         def GetFreeBoundary(self, theObject, theName=None):
6322             """
6323             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6324             that constitute a free boundary of the given shape.
6325
6326             Parameters:
6327                 theObject Shape to get free boundary of.
6328                 theName Object name; when specified, this parameter is used
6329                         for result publication in the study. Otherwise, if automatic
6330                         publication is switched on, default value is used for result name.
6331
6332             Returns: 
6333                 [status, theClosedWires, theOpenWires]
6334                  status: FALSE, if an error(s) occured during the method execution.
6335                  theClosedWires: Closed wires on the free boundary of the given shape.
6336                  theOpenWires: Open wires on the free boundary of the given shape.
6337             """
6338             # Example: see GEOM_TestHealing.py
6339             anObj = self.HealOp.GetFreeBoundary(theObject)
6340             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6341             self._autoPublish(anObj[1], theName, "closedWire")
6342             self._autoPublish(anObj[2], theName, "openWire")
6343             return anObj
6344
6345         ## Replace coincident faces in theShape by one face.
6346         #  @param theShape Initial shape.
6347         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6348         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6349         #                         otherwise all initial shapes.
6350         #  @param theName Object name; when specified, this parameter is used
6351         #         for result publication in the study. Otherwise, if automatic
6352         #         publication is switched on, default value is used for result name.
6353         #
6354         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6355         #
6356         #  @ref tui_glue_faces "Example"
6357         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6358             """
6359             Replace coincident faces in theShape by one face.
6360
6361             Parameters:
6362                 theShape Initial shape.
6363                 theTolerance Maximum distance between faces, which can be considered as coincident.
6364                 doKeepNonSolids If FALSE, only solids will present in the result,
6365                                 otherwise all initial shapes.
6366                 theName Object name; when specified, this parameter is used
6367                         for result publication in the study. Otherwise, if automatic
6368                         publication is switched on, default value is used for result name.
6369
6370             Returns:
6371                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6372             """
6373             # Example: see GEOM_Spanner.py
6374             theTolerance,Parameters = ParseParameters(theTolerance)
6375             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6376             if anObj is None:
6377                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6378             anObj.SetParameters(Parameters)
6379             self._autoPublish(anObj, theName, "glueFaces")
6380             return anObj
6381
6382         ## Find coincident faces in theShape for possible gluing.
6383         #  @param theShape Initial shape.
6384         #  @param theTolerance Maximum distance between faces,
6385         #                      which can be considered as coincident.
6386         #  @param 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         #  @return GEOM.ListOfGO
6391         #
6392         #  @ref tui_glue_faces "Example"
6393         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6394             """
6395             Find coincident faces in theShape for possible gluing.
6396
6397             Parameters:
6398                 theShape Initial shape.
6399                 theTolerance Maximum distance between faces,
6400                              which can be considered as coincident.
6401                 theName Object name; when specified, this parameter is used
6402                         for result publication in the study. Otherwise, if automatic
6403                         publication is switched on, default value is used for result name.
6404
6405             Returns:                    
6406                 GEOM.ListOfGO
6407             """
6408             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6409             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6410             self._autoPublish(anObj, theName, "facesToGlue")
6411             return anObj
6412
6413         ## Replace coincident faces in theShape by one face
6414         #  in compliance with given list of faces
6415         #  @param theShape Initial shape.
6416         #  @param theTolerance Maximum distance between faces,
6417         #                      which can be considered as coincident.
6418         #  @param theFaces List of faces for gluing.
6419         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6420         #                         otherwise all initial shapes.
6421         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6422         #                        will be glued, otherwise only the edges,
6423         #                        belonging to <VAR>theFaces</VAR>.
6424         #  @param theName Object name; when specified, this parameter is used
6425         #         for result publication in the study. Otherwise, if automatic
6426         #         publication is switched on, default value is used for result name.
6427         #
6428         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6429         #          without some faces.
6430         #
6431         #  @ref tui_glue_faces "Example"
6432         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6433                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6434             """
6435             Replace coincident faces in theShape by one face
6436             in compliance with given list of faces
6437
6438             Parameters:
6439                 theShape Initial shape.
6440                 theTolerance Maximum distance between faces,
6441                              which can be considered as coincident.
6442                 theFaces List of faces for gluing.
6443                 doKeepNonSolids If FALSE, only solids will present in the result,
6444                                 otherwise all initial shapes.
6445                 doGlueAllEdges If TRUE, all coincident edges of theShape
6446                                will be glued, otherwise only the edges,
6447                                belonging to theFaces.
6448                 theName Object name; when specified, this parameter is used
6449                         for result publication in the study. Otherwise, if automatic
6450                         publication is switched on, default value is used for result name.
6451
6452             Returns:
6453                 New GEOM.GEOM_Object, containing a copy of theShape
6454                     without some faces.
6455             """
6456             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6457                                                       doKeepNonSolids, doGlueAllEdges)
6458             if anObj is None:
6459                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6460             self._autoPublish(anObj, theName, "glueFaces")
6461             return anObj
6462
6463         ## Replace coincident edges in theShape by one edge.
6464         #  @param theShape Initial shape.
6465         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6466         #  @param theName Object name; when specified, this parameter is used
6467         #         for result publication in the study. Otherwise, if automatic
6468         #         publication is switched on, default value is used for result name.
6469         #
6470         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6471         #
6472         #  @ref tui_glue_edges "Example"
6473         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6474             """
6475             Replace coincident edges in theShape by one edge.
6476
6477             Parameters:
6478                 theShape Initial shape.
6479                 theTolerance Maximum distance between edges, which can be considered as coincident.
6480                 theName Object name; when specified, this parameter is used
6481                         for result publication in the study. Otherwise, if automatic
6482                         publication is switched on, default value is used for result name.
6483
6484             Returns:    
6485                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6486             """
6487             theTolerance,Parameters = ParseParameters(theTolerance)
6488             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6489             if anObj is None:
6490                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6491             anObj.SetParameters(Parameters)
6492             self._autoPublish(anObj, theName, "glueEdges")
6493             return anObj
6494
6495         ## Find coincident edges in theShape for possible gluing.
6496         #  @param theShape Initial shape.
6497         #  @param theTolerance Maximum distance between edges,
6498         #                      which can be considered as coincident.
6499         #  @param theName Object name; when specified, this parameter is used
6500         #         for result publication in the study. Otherwise, if automatic
6501         #         publication is switched on, default value is used for result name.
6502         #
6503         #  @return GEOM.ListOfGO
6504         #
6505         #  @ref tui_glue_edges "Example"
6506         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6507             """
6508             Find coincident edges in theShape for possible gluing.
6509
6510             Parameters:
6511                 theShape Initial shape.
6512                 theTolerance Maximum distance between edges,
6513                              which can be considered as coincident.
6514                 theName Object name; when specified, this parameter is used
6515                         for result publication in the study. Otherwise, if automatic
6516                         publication is switched on, default value is used for result name.
6517
6518             Returns:                         
6519                 GEOM.ListOfGO
6520             """
6521             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6522             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6523             self._autoPublish(anObj, theName, "edgesToGlue")
6524             return anObj
6525
6526         ## Replace coincident edges in theShape by one edge
6527         #  in compliance with given list of edges.
6528         #  @param theShape Initial shape.
6529         #  @param theTolerance Maximum distance between edges,
6530         #                      which can be considered as coincident.
6531         #  @param theEdges List of edges for gluing.
6532         #  @param theName Object name; when specified, this parameter is used
6533         #         for result publication in the study. Otherwise, if automatic
6534         #         publication is switched on, default value is used for result name.
6535         #
6536         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6537         #          without some edges.
6538         #
6539         #  @ref tui_glue_edges "Example"
6540         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6541             """
6542             Replace coincident edges in theShape by one edge
6543             in compliance with given list of edges.
6544
6545             Parameters:
6546                 theShape Initial shape.
6547                 theTolerance Maximum distance between edges,
6548                              which can be considered as coincident.
6549                 theEdges List of edges for gluing.
6550                 theName Object name; when specified, this parameter is used
6551                         for result publication in the study. Otherwise, if automatic
6552                         publication is switched on, default value is used for result name.
6553
6554             Returns:  
6555                 New GEOM.GEOM_Object, containing a copy of theShape
6556                 without some edges.
6557             """
6558             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6559             if anObj is None:
6560                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6561             self._autoPublish(anObj, theName, "glueEdges")
6562             return anObj
6563
6564         # end of l3_healing
6565         ## @}
6566
6567         ## @addtogroup l3_boolean Boolean Operations
6568         ## @{
6569
6570         # -----------------------------------------------------------------------------
6571         # Boolean (Common, Cut, Fuse, Section)
6572         # -----------------------------------------------------------------------------
6573
6574         ## Perform one of boolean operations on two given shapes.
6575         #  @param theShape1 First argument for boolean operation.
6576         #  @param theShape2 Second argument for boolean operation.
6577         #  @param theOperation Indicates the operation to be done:\n
6578         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6579         #  @param theName Object name; when specified, this parameter is used
6580         #         for result publication in the study. Otherwise, if automatic
6581         #         publication is switched on, default value is used for result name.
6582         #
6583         #  @return New GEOM.GEOM_Object, containing the result shape.
6584         #
6585         #  @ref tui_fuse "Example"
6586         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6587             """
6588             Perform one of boolean operations on two given shapes.
6589
6590             Parameters: 
6591                 theShape1 First argument for boolean operation.
6592                 theShape2 Second argument for boolean operation.
6593                 theOperation Indicates the operation to be done:
6594                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6595                 theName Object name; when specified, this parameter is used
6596                         for result publication in the study. Otherwise, if automatic
6597                         publication is switched on, default value is used for result name.
6598
6599             Returns:   
6600                 New GEOM.GEOM_Object, containing the result shape.
6601             """
6602             # Example: see GEOM_TestAll.py
6603             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6604             RaiseIfFailed("MakeBoolean", self.BoolOp)
6605             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6606             self._autoPublish(anObj, theName, def_names[theOperation])
6607             return anObj
6608
6609         ## Perform Common boolean operation on two given shapes.
6610         #  @param theShape1 First argument for boolean operation.
6611         #  @param theShape2 Second argument for boolean operation.
6612         #  @param theName Object name; when specified, this parameter is used
6613         #         for result publication in the study. Otherwise, if automatic
6614         #         publication is switched on, default value is used for result name.
6615         #
6616         #  @return New GEOM.GEOM_Object, containing the result shape.
6617         #
6618         #  @ref tui_common "Example 1"
6619         #  \n @ref swig_MakeCommon "Example 2"
6620         def MakeCommon(self, theShape1, theShape2, theName=None):
6621             """
6622             Perform Common boolean operation on two given shapes.
6623
6624             Parameters: 
6625                 theShape1 First argument for boolean operation.
6626                 theShape2 Second argument for boolean operation.
6627                 theName Object name; when specified, this parameter is used
6628                         for result publication in the study. Otherwise, if automatic
6629                         publication is switched on, default value is used for result name.
6630
6631             Returns:   
6632                 New GEOM.GEOM_Object, containing the result shape.
6633             """
6634             # Example: see GEOM_TestOthers.py
6635             # note: auto-publishing is done in self.MakeBoolean()
6636             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6637
6638         ## Perform Cut boolean operation on two given shapes.
6639         #  @param theShape1 First argument for boolean operation.
6640         #  @param theShape2 Second argument for boolean operation.
6641         #  @param theName Object name; when specified, this parameter is used
6642         #         for result publication in the study. Otherwise, if automatic
6643         #         publication is switched on, default value is used for result name.
6644         #
6645         #  @return New GEOM.GEOM_Object, containing the result shape.
6646         #
6647         #  @ref tui_cut "Example 1"
6648         #  \n @ref swig_MakeCommon "Example 2"
6649         def MakeCut(self, theShape1, theShape2, theName=None):
6650             """
6651             Perform Cut boolean operation on two given shapes.
6652
6653             Parameters: 
6654                 theShape1 First argument for boolean operation.
6655                 theShape2 Second argument for boolean operation.
6656                 theName Object name; when specified, this parameter is used
6657                         for result publication in the study. Otherwise, if automatic
6658                         publication is switched on, default value is used for result name.
6659
6660             Returns:   
6661                 New GEOM.GEOM_Object, containing the result shape.
6662             
6663             """
6664             # Example: see GEOM_TestOthers.py
6665             # note: auto-publishing is done in self.MakeBoolean()
6666             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6667
6668         ## Perform Fuse boolean operation on two given shapes.
6669         #  @param theShape1 First argument for boolean operation.
6670         #  @param theShape2 Second argument for boolean operation.
6671         #  @param theName Object name; when specified, this parameter is used
6672         #         for result publication in the study. Otherwise, if automatic
6673         #         publication is switched on, default value is used for result name.
6674         #
6675         #  @return New GEOM.GEOM_Object, containing the result shape.
6676         #
6677         #  @ref tui_fuse "Example 1"
6678         #  \n @ref swig_MakeCommon "Example 2"
6679         def MakeFuse(self, theShape1, theShape2, theName=None):
6680             """
6681             Perform Fuse boolean operation on two given shapes.
6682
6683             Parameters: 
6684                 theShape1 First argument for boolean operation.
6685                 theShape2 Second argument for boolean operation.
6686                 theName Object name; when specified, this parameter is used
6687                         for result publication in the study. Otherwise, if automatic
6688                         publication is switched on, default value is used for result name.
6689
6690             Returns:   
6691                 New GEOM.GEOM_Object, containing the result shape.
6692             
6693             """
6694             # Example: see GEOM_TestOthers.py
6695             # note: auto-publishing is done in self.MakeBoolean()
6696             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6697
6698         ## Perform Section boolean operation on two given shapes.
6699         #  @param theShape1 First argument for boolean operation.
6700         #  @param theShape2 Second argument for boolean operation.
6701         #  @param theName Object name; when specified, this parameter is used
6702         #         for result publication in the study. Otherwise, if automatic
6703         #         publication is switched on, default value is used for result name.
6704         #
6705         #  @return New GEOM.GEOM_Object, containing the result shape.
6706         #
6707         #  @ref tui_section "Example 1"
6708         #  \n @ref swig_MakeCommon "Example 2"
6709         def MakeSection(self, theShape1, theShape2, theName=None):
6710             """
6711             Perform Section boolean operation on two given shapes.
6712
6713             Parameters: 
6714                 theShape1 First argument for boolean operation.
6715                 theShape2 Second argument for boolean operation.
6716                 theName Object name; when specified, this parameter is used
6717                         for result publication in the study. Otherwise, if automatic
6718                         publication is switched on, default value is used for result name.
6719
6720             Returns:   
6721                 New GEOM.GEOM_Object, containing the result shape.
6722             
6723             """
6724             # Example: see GEOM_TestOthers.py
6725             # note: auto-publishing is done in self.MakeBoolean()
6726             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6727
6728         ## Perform Fuse boolean operation on the list of shapes.
6729         #  @param theShapesList Shapes to be fused.
6730         #  @param theName Object name; when specified, this parameter is used
6731         #         for result publication in the study. Otherwise, if automatic
6732         #         publication is switched on, default value is used for result name.
6733         #
6734         #  @return New GEOM.GEOM_Object, containing the result shape.
6735         #
6736         #  @ref tui_fuse "Example 1"
6737         #  \n @ref swig_MakeCommon "Example 2"
6738         def MakeFuseList(self, theShapesList, theName=None):
6739             """
6740             Perform Fuse boolean operation on the list of shapes.
6741
6742             Parameters: 
6743                 theShapesList Shapes to be fused.
6744                 theName Object name; when specified, this parameter is used
6745                         for result publication in the study. Otherwise, if automatic
6746                         publication is switched on, default value is used for result name.
6747
6748             Returns:   
6749                 New GEOM.GEOM_Object, containing the result shape.
6750             
6751             """
6752             # Example: see GEOM_TestOthers.py
6753             anObj = self.BoolOp.MakeFuseList(theShapesList)
6754             RaiseIfFailed("MakeFuseList", self.BoolOp)
6755             self._autoPublish(anObj, theName, "fuse")
6756             return anObj
6757
6758         ## Perform Common boolean operation on the list of shapes.
6759         #  @param theShapesList Shapes for Common operation.
6760         #  @param theName Object name; when specified, this parameter is used
6761         #         for result publication in the study. Otherwise, if automatic
6762         #         publication is switched on, default value is used for result name.
6763         #
6764         #  @return New GEOM.GEOM_Object, containing the result shape.
6765         #
6766         #  @ref tui_common "Example 1"
6767         #  \n @ref swig_MakeCommon "Example 2"
6768         def MakeCommonList(self, theShapesList, theName=None):
6769             """
6770             Perform Common boolean operation on the list of shapes.
6771
6772             Parameters: 
6773                 theShapesList Shapes for Common operation.
6774                 theName Object name; when specified, this parameter is used
6775                         for result publication in the study. Otherwise, if automatic
6776                         publication is switched on, default value is used for result name.
6777
6778             Returns:   
6779                 New GEOM.GEOM_Object, containing the result shape.
6780             
6781             """
6782             # Example: see GEOM_TestOthers.py
6783             anObj = self.BoolOp.MakeCommonList(theShapesList)
6784             RaiseIfFailed("MakeCommonList", self.BoolOp)
6785             self._autoPublish(anObj, theName, "common")
6786             return anObj
6787
6788         ## Perform Cut boolean operation on one object and the list of tools.
6789         #  @param theMainShape The object of the operation.
6790         #  @param theShapesList The list of tools of the operation.
6791         #  @param theName Object name; when specified, this parameter is used
6792         #         for result publication in the study. Otherwise, if automatic
6793         #         publication is switched on, default value is used for result name.
6794         #
6795         #  @return New GEOM.GEOM_Object, containing the result shape.
6796         #
6797         #  @ref tui_cut "Example 1"
6798         #  \n @ref swig_MakeCommon "Example 2"
6799         def MakeCutList(self, theMainShape, theShapesList, theName=None):
6800             """
6801             Perform Cut boolean operation on one object and the list of tools.
6802
6803             Parameters: 
6804                 theMainShape The object of the operation.
6805                 theShapesList The list of tools of the operation.
6806                 theName Object name; when specified, this parameter is used
6807                         for result publication in the study. Otherwise, if automatic
6808                         publication is switched on, default value is used for result name.
6809
6810             Returns:   
6811                 New GEOM.GEOM_Object, containing the result shape.
6812             
6813             """
6814             # Example: see GEOM_TestOthers.py
6815             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList)
6816             RaiseIfFailed("MakeCutList", self.BoolOp)
6817             self._autoPublish(anObj, theName, "cut")
6818             return anObj
6819
6820         # end of l3_boolean
6821         ## @}
6822
6823         ## @addtogroup l3_basic_op
6824         ## @{
6825
6826         ## Perform partition operation.
6827         #  @param ListShapes Shapes to be intersected.
6828         #  @param ListTools Shapes to intersect theShapes.
6829         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6830         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6831         #         type will be detected automatically.
6832         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6833         #                             target type (equal to Limit) are kept in the result,
6834         #                             else standalone shapes of lower dimension
6835         #                             are kept also (if they exist).
6836         #  @param theName Object name; when specified, this parameter is used
6837         #         for result publication in the study. Otherwise, if automatic
6838         #         publication is switched on, default value is used for result name.
6839         #
6840         #  @note Each compound from ListShapes and ListTools will be exploded
6841         #        in order to avoid possible intersection between shapes from this compound.
6842         #
6843         #  After implementation new version of PartitionAlgo (October 2006)
6844         #  other parameters are ignored by current functionality. They are kept
6845         #  in this function only for support old versions.
6846         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6847         #         Each shape from theKeepInside must belong to theShapes also.
6848         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6849         #         Each shape from theRemoveInside must belong to theShapes also.
6850         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6851         #      @param ListMaterials Material indices for each shape. Make sence,
6852         #         only if theRemoveWebs is TRUE.
6853         #
6854         #  @return New GEOM.GEOM_Object, containing the result shapes.
6855         #
6856         #  @ref tui_partition "Example"
6857         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6858                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6859                           KeepNonlimitShapes=0, theName=None):
6860             """
6861             Perform partition operation.
6862
6863             Parameters: 
6864                 ListShapes Shapes to be intersected.
6865                 ListTools Shapes to intersect theShapes.
6866                 Limit Type of resulting shapes (see geompy.ShapeType)
6867                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6868                       type will be detected automatically.
6869                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6870                                     target type (equal to Limit) are kept in the result,
6871                                     else standalone shapes of lower dimension
6872                                     are kept also (if they exist).
6873                 theName Object name; when specified, this parameter is used
6874                         for result publication in the study. Otherwise, if automatic
6875                         publication is switched on, default value is used for result name.
6876             Note:
6877                     Each compound from ListShapes and ListTools will be exploded
6878                     in order to avoid possible intersection between shapes from
6879                     this compound.
6880                     
6881             After implementation new version of PartitionAlgo (October 2006) other
6882             parameters are ignored by current functionality. They are kept in this
6883             function only for support old versions.
6884             
6885             Ignored parameters:
6886                 ListKeepInside Shapes, outside which the results will be deleted.
6887                                Each shape from theKeepInside must belong to theShapes also.
6888                 ListRemoveInside Shapes, inside which the results will be deleted.
6889                                  Each shape from theRemoveInside must belong to theShapes also.
6890                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6891                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6892
6893             Returns:   
6894                 New GEOM.GEOM_Object, containing the result shapes.
6895             """
6896             # Example: see GEOM_TestAll.py
6897             if Limit == self.ShapeType["AUTO"]:
6898                 # automatic detection of the most appropriate shape limit type
6899                 lim = GEOM.SHAPE
6900                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6901                 Limit = EnumToLong(lim)
6902                 pass
6903             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6904                                               ListKeepInside, ListRemoveInside,
6905                                               Limit, RemoveWebs, ListMaterials,
6906                                               KeepNonlimitShapes);
6907             RaiseIfFailed("MakePartition", self.BoolOp)
6908             self._autoPublish(anObj, theName, "partition")
6909             return anObj
6910
6911         ## Perform partition operation.
6912         #  This method may be useful if it is needed to make a partition for
6913         #  compound contains nonintersected shapes. Performance will be better
6914         #  since intersection between shapes from compound is not performed.
6915         #
6916         #  Description of all parameters as in previous method MakePartition()
6917         #
6918         #  @note Passed compounds (via ListShapes or via ListTools)
6919         #           have to consist of nonintersecting shapes.
6920         #
6921         #  @return New GEOM.GEOM_Object, containing the result shapes.
6922         #
6923         #  @ref swig_todo "Example"
6924         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6925                                                  ListKeepInside=[], ListRemoveInside=[],
6926                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6927                                                  ListMaterials=[], KeepNonlimitShapes=0,
6928                                                  theName=None):
6929             """
6930             Perform partition operation.
6931             This method may be useful if it is needed to make a partition for
6932             compound contains nonintersected shapes. Performance will be better
6933             since intersection between shapes from compound is not performed.
6934
6935             Parameters: 
6936                 Description of all parameters as in method geompy.MakePartition
6937         
6938             NOTE:
6939                 Passed compounds (via ListShapes or via ListTools)
6940                 have to consist of nonintersecting shapes.
6941
6942             Returns:   
6943                 New GEOM.GEOM_Object, containing the result shapes.
6944             """
6945             if Limit == self.ShapeType["AUTO"]:
6946                 # automatic detection of the most appropriate shape limit type
6947                 lim = GEOM.SHAPE
6948                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6949                 Limit = EnumToLong(lim)
6950                 pass
6951             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6952                                                                      ListKeepInside, ListRemoveInside,
6953                                                                      Limit, RemoveWebs, ListMaterials,
6954                                                                      KeepNonlimitShapes);
6955             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6956             self._autoPublish(anObj, theName, "partition")
6957             return anObj
6958
6959         ## See method MakePartition() for more information.
6960         #
6961         #  @ref tui_partition "Example 1"
6962         #  \n @ref swig_Partition "Example 2"
6963         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6964                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6965                       KeepNonlimitShapes=0, theName=None):
6966             """
6967             See method geompy.MakePartition for more information.
6968             """
6969             # Example: see GEOM_TestOthers.py
6970             # note: auto-publishing is done in self.MakePartition()
6971             anObj = self.MakePartition(ListShapes, ListTools,
6972                                        ListKeepInside, ListRemoveInside,
6973                                        Limit, RemoveWebs, ListMaterials,
6974                                        KeepNonlimitShapes, theName);
6975             return anObj
6976
6977         ## Perform partition of the Shape with the Plane
6978         #  @param theShape Shape to be intersected.
6979         #  @param thePlane Tool shape, to intersect theShape.
6980         #  @param theName Object name; when specified, this parameter is used
6981         #         for result publication in the study. Otherwise, if automatic
6982         #         publication is switched on, default value is used for result name.
6983         #
6984         #  @return New GEOM.GEOM_Object, containing the result shape.
6985         #
6986         #  @ref tui_partition "Example"
6987         def MakeHalfPartition(self, theShape, thePlane, theName=None):
6988             """
6989             Perform partition of the Shape with the Plane
6990
6991             Parameters: 
6992                 theShape Shape to be intersected.
6993                 thePlane Tool shape, to intersect theShape.
6994                 theName Object name; when specified, this parameter is used
6995                         for result publication in the study. Otherwise, if automatic
6996                         publication is switched on, default value is used for result name.
6997
6998             Returns:  
6999                 New GEOM.GEOM_Object, containing the result shape.
7000             """
7001             # Example: see GEOM_TestAll.py
7002             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7003             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7004             self._autoPublish(anObj, theName, "partition")
7005             return anObj
7006
7007         # end of l3_basic_op
7008         ## @}
7009
7010         ## @addtogroup l3_transform
7011         ## @{
7012
7013         ## Translate the given object along the vector, specified
7014         #  by its end points.
7015         #  @param theObject The object to be translated.
7016         #  @param thePoint1 Start point of translation vector.
7017         #  @param thePoint2 End point of translation vector.
7018         #  @param theCopy Flag used to translate object itself or create a copy.
7019         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7020         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7021         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7022             """
7023             Translate the given object along the vector, specified by its end points.
7024
7025             Parameters: 
7026                 theObject The object to be translated.
7027                 thePoint1 Start point of translation vector.
7028                 thePoint2 End point of translation vector.
7029                 theCopy Flag used to translate object itself or create a copy.
7030
7031             Returns: 
7032                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7033                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7034             """
7035             if theCopy:
7036                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7037             else:
7038                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7039             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7040             return anObj
7041
7042         ## Translate the given object along the vector, specified
7043         #  by its end points, creating its copy before the translation.
7044         #  @param theObject The object to be translated.
7045         #  @param thePoint1 Start point of translation vector.
7046         #  @param thePoint2 End point of translation vector.
7047         #  @param theName Object name; when specified, this parameter is used
7048         #         for result publication in the study. Otherwise, if automatic
7049         #         publication is switched on, default value is used for result name.
7050         #
7051         #  @return New GEOM.GEOM_Object, containing the translated object.
7052         #
7053         #  @ref tui_translation "Example 1"
7054         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7055         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7056             """
7057             Translate the given object along the vector, specified
7058             by its end points, creating its copy before the translation.
7059
7060             Parameters: 
7061                 theObject The object to be translated.
7062                 thePoint1 Start point of translation vector.
7063                 thePoint2 End point of translation vector.
7064                 theName Object name; when specified, this parameter is used
7065                         for result publication in the study. Otherwise, if automatic
7066                         publication is switched on, default value is used for result name.
7067
7068             Returns:  
7069                 New GEOM.GEOM_Object, containing the translated object.
7070             """
7071             # Example: see GEOM_TestAll.py
7072             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7073             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7074             self._autoPublish(anObj, theName, "translated")
7075             return anObj
7076
7077         ## Translate the given object along the vector, specified by its components.
7078         #  @param theObject The object to be translated.
7079         #  @param theDX,theDY,theDZ Components of translation vector.
7080         #  @param theCopy Flag used to translate object itself or create a copy.
7081         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7082         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7083         #
7084         #  @ref tui_translation "Example"
7085         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7086             """
7087             Translate the given object along the vector, specified by its components.
7088
7089             Parameters: 
7090                 theObject The object to be translated.
7091                 theDX,theDY,theDZ Components of translation vector.
7092                 theCopy Flag used to translate object itself or create a copy.
7093
7094             Returns: 
7095                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7096                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7097             """
7098             # Example: see GEOM_TestAll.py
7099             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7100             if theCopy:
7101                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7102             else:
7103                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7104             anObj.SetParameters(Parameters)
7105             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7106             return anObj
7107
7108         ## Translate the given object along the vector, specified
7109         #  by its components, creating its copy before the translation.
7110         #  @param theObject The object to be translated.
7111         #  @param theDX,theDY,theDZ Components of translation vector.
7112         #  @param theName Object name; when specified, this parameter is used
7113         #         for result publication in the study. Otherwise, if automatic
7114         #         publication is switched on, default value is used for result name.
7115         #
7116         #  @return New GEOM.GEOM_Object, containing the translated object.
7117         #
7118         #  @ref tui_translation "Example"
7119         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7120             """
7121             Translate the given object along the vector, specified
7122             by its components, creating its copy before the translation.
7123
7124             Parameters: 
7125                 theObject The object to be translated.
7126                 theDX,theDY,theDZ Components of translation vector.
7127                 theName Object name; when specified, this parameter is used
7128                         for result publication in the study. Otherwise, if automatic
7129                         publication is switched on, default value is used for result name.
7130
7131             Returns: 
7132                 New GEOM.GEOM_Object, containing the translated object.
7133             """
7134             # Example: see GEOM_TestAll.py
7135             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7136             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7137             anObj.SetParameters(Parameters)
7138             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7139             self._autoPublish(anObj, theName, "translated")
7140             return anObj
7141
7142         ## Translate the given object along the given vector.
7143         #  @param theObject The object to be translated.
7144         #  @param theVector The translation vector.
7145         #  @param theCopy Flag used to translate object itself or create a copy.
7146         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7147         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7148         def TranslateVector(self, theObject, theVector, theCopy=False):
7149             """
7150             Translate the given object along the given vector.
7151
7152             Parameters: 
7153                 theObject The object to be translated.
7154                 theVector The translation vector.
7155                 theCopy Flag used to translate object itself or create a copy.
7156
7157             Returns: 
7158                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7159                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7160             """
7161             if theCopy:
7162                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7163             else:
7164                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7165             RaiseIfFailed("TranslateVector", self.TrsfOp)
7166             return anObj
7167
7168         ## Translate the given object along the given vector,
7169         #  creating its copy before the translation.
7170         #  @param theObject The object to be translated.
7171         #  @param theVector The translation vector.
7172         #  @param theName Object name; when specified, this parameter is used
7173         #         for result publication in the study. Otherwise, if automatic
7174         #         publication is switched on, default value is used for result name.
7175         #
7176         #  @return New GEOM.GEOM_Object, containing the translated object.
7177         #
7178         #  @ref tui_translation "Example"
7179         def MakeTranslationVector(self, theObject, theVector, theName=None):
7180             """
7181             Translate the given object along the given vector,
7182             creating its copy before the translation.
7183
7184             Parameters: 
7185                 theObject The object to be translated.
7186                 theVector The translation vector.
7187                 theName Object name; when specified, this parameter is used
7188                         for result publication in the study. Otherwise, if automatic
7189                         publication is switched on, default value is used for result name.
7190
7191             Returns: 
7192                 New GEOM.GEOM_Object, containing the translated object.
7193             """
7194             # Example: see GEOM_TestAll.py
7195             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7196             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7197             self._autoPublish(anObj, theName, "translated")
7198             return anObj
7199
7200         ## Translate the given object along the given vector on given distance.
7201         #  @param theObject The object to be translated.
7202         #  @param theVector The translation vector.
7203         #  @param theDistance The translation distance.
7204         #  @param theCopy Flag used to translate object itself or create a copy.
7205         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7206         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7207         #
7208         #  @ref tui_translation "Example"
7209         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7210             """
7211             Translate the given object along the given vector on given distance.
7212
7213             Parameters: 
7214                 theObject The object to be translated.
7215                 theVector The translation vector.
7216                 theDistance The translation distance.
7217                 theCopy Flag used to translate object itself or create a copy.
7218
7219             Returns: 
7220                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7221                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7222             """
7223             # Example: see GEOM_TestAll.py
7224             theDistance,Parameters = ParseParameters(theDistance)
7225             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7226             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7227             anObj.SetParameters(Parameters)
7228             return anObj
7229
7230         ## Translate the given object along the given vector on given distance,
7231         #  creating its copy before the translation.
7232         #  @param theObject The object to be translated.
7233         #  @param theVector The translation vector.
7234         #  @param theDistance The translation distance.
7235         #  @param theName Object name; when specified, this parameter is used
7236         #         for result publication in the study. Otherwise, if automatic
7237         #         publication is switched on, default value is used for result name.
7238         #
7239         #  @return New GEOM.GEOM_Object, containing the translated object.
7240         #
7241         #  @ref tui_translation "Example"
7242         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7243             """
7244             Translate the given object along the given vector on given distance,
7245             creating its copy before the translation.
7246
7247             Parameters:
7248                 theObject The object to be translated.
7249                 theVector The translation vector.
7250                 theDistance The translation distance.
7251                 theName Object name; when specified, this parameter is used
7252                         for result publication in the study. Otherwise, if automatic
7253                         publication is switched on, default value is used for result name.
7254
7255             Returns: 
7256                 New GEOM.GEOM_Object, containing the translated object.
7257             """
7258             # Example: see GEOM_TestAll.py
7259             theDistance,Parameters = ParseParameters(theDistance)
7260             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7261             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7262             anObj.SetParameters(Parameters)
7263             self._autoPublish(anObj, theName, "translated")
7264             return anObj
7265
7266         ## Rotate the given object around the given axis on the given angle.
7267         #  @param theObject The object to be rotated.
7268         #  @param theAxis Rotation axis.
7269         #  @param theAngle Rotation angle in radians.
7270         #  @param theCopy Flag used to rotate object itself or create a copy.
7271         #
7272         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7273         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7274         #
7275         #  @ref tui_rotation "Example"
7276         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7277             """
7278             Rotate the given object around the given axis on the given angle.
7279
7280             Parameters:
7281                 theObject The object to be rotated.
7282                 theAxis Rotation axis.
7283                 theAngle Rotation angle in radians.
7284                 theCopy Flag used to rotate object itself or create a copy.
7285
7286             Returns:
7287                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7288                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7289             """
7290             # Example: see GEOM_TestAll.py
7291             flag = False
7292             if isinstance(theAngle,str):
7293                 flag = True
7294             theAngle, Parameters = ParseParameters(theAngle)
7295             if flag:
7296                 theAngle = theAngle*math.pi/180.0
7297             if theCopy:
7298                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7299             else:
7300                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7301             RaiseIfFailed("Rotate", self.TrsfOp)
7302             anObj.SetParameters(Parameters)
7303             return anObj
7304
7305         ## Rotate the given object around the given axis
7306         #  on the given angle, creating its copy before the rotatation.
7307         #  @param theObject The object to be rotated.
7308         #  @param theAxis Rotation axis.
7309         #  @param theAngle Rotation angle in radians.
7310         #  @param theName Object name; when specified, this parameter is used
7311         #         for result publication in the study. Otherwise, if automatic
7312         #         publication is switched on, default value is used for result name.
7313         #
7314         #  @return New GEOM.GEOM_Object, containing the rotated object.
7315         #
7316         #  @ref tui_rotation "Example"
7317         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7318             """
7319             Rotate the given object around the given axis
7320             on the given angle, creating its copy before the rotatation.
7321
7322             Parameters:
7323                 theObject The object to be rotated.
7324                 theAxis Rotation axis.
7325                 theAngle Rotation angle in radians.
7326                 theName Object name; when specified, this parameter is used
7327                         for result publication in the study. Otherwise, if automatic
7328                         publication is switched on, default value is used for result name.
7329
7330             Returns:
7331                 New GEOM.GEOM_Object, containing the rotated object.
7332             """
7333             # Example: see GEOM_TestAll.py
7334             flag = False
7335             if isinstance(theAngle,str):
7336                 flag = True
7337             theAngle, Parameters = ParseParameters(theAngle)
7338             if flag:
7339                 theAngle = theAngle*math.pi/180.0
7340             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7341             RaiseIfFailed("RotateCopy", self.TrsfOp)
7342             anObj.SetParameters(Parameters)
7343             self._autoPublish(anObj, theName, "rotated")
7344             return anObj
7345
7346         ## Rotate given object around vector perpendicular to plane
7347         #  containing three points.
7348         #  @param theObject The object to be rotated.
7349         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7350         #  containing the three points.
7351         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7352         #  @param theCopy Flag used to rotate object itself or create a copy.
7353         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7354         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7355         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7356             """
7357             Rotate given object around vector perpendicular to plane
7358             containing three points.
7359
7360             Parameters:
7361                 theObject The object to be rotated.
7362                 theCentPoint central point  the axis is the vector perpendicular to the plane
7363                              containing the three points.
7364                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7365                 theCopy Flag used to rotate object itself or create a copy.
7366
7367             Returns:
7368                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7369                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7370             """
7371             if theCopy:
7372                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7373             else:
7374                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7375             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7376             return anObj
7377
7378         ## Rotate given object around vector perpendicular to plane
7379         #  containing three points, creating its copy before the rotatation.
7380         #  @param theObject The object to be rotated.
7381         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7382         #  containing the three points.
7383         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7384         #  @param theName Object name; when specified, this parameter is used
7385         #         for result publication in the study. Otherwise, if automatic
7386         #         publication is switched on, default value is used for result name.
7387         #
7388         #  @return New GEOM.GEOM_Object, containing the rotated object.
7389         #
7390         #  @ref tui_rotation "Example"
7391         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7392             """
7393             Rotate given object around vector perpendicular to plane
7394             containing three points, creating its copy before the rotatation.
7395
7396             Parameters:
7397                 theObject The object to be rotated.
7398                 theCentPoint central point  the axis is the vector perpendicular to the plane
7399                              containing the three points.
7400                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7401                 theName Object name; when specified, this parameter is used
7402                         for result publication in the study. Otherwise, if automatic
7403                         publication is switched on, default value is used for result name.
7404
7405             Returns:
7406                 New GEOM.GEOM_Object, containing the rotated object.
7407             """
7408             # Example: see GEOM_TestAll.py
7409             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7410             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7411             self._autoPublish(anObj, theName, "rotated")
7412             return anObj
7413
7414         ## Scale the given object by the specified factor.
7415         #  @param theObject The object to be scaled.
7416         #  @param thePoint Center point for scaling.
7417         #                  Passing None for it means scaling relatively the origin of global CS.
7418         #  @param theFactor Scaling factor value.
7419         #  @param theCopy Flag used to scale object itself or create a copy.
7420         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7421         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7422         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7423             """
7424             Scale the given object by the specified factor.
7425
7426             Parameters:
7427                 theObject The object to be scaled.
7428                 thePoint Center point for scaling.
7429                          Passing None for it means scaling relatively the origin of global CS.
7430                 theFactor Scaling factor value.
7431                 theCopy Flag used to scale object itself or create a copy.
7432
7433             Returns:    
7434                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7435                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7436             """
7437             # Example: see GEOM_TestAll.py
7438             theFactor, Parameters = ParseParameters(theFactor)
7439             if theCopy:
7440                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7441             else:
7442                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7443             RaiseIfFailed("Scale", self.TrsfOp)
7444             anObj.SetParameters(Parameters)
7445             return anObj
7446
7447         ## Scale the given object by the factor, creating its copy before the scaling.
7448         #  @param theObject The object to be scaled.
7449         #  @param thePoint Center point for scaling.
7450         #                  Passing None for it means scaling relatively the origin of global CS.
7451         #  @param theFactor Scaling factor value.
7452         #  @param theName Object name; when specified, this parameter is used
7453         #         for result publication in the study. Otherwise, if automatic
7454         #         publication is switched on, default value is used for result name.
7455         #
7456         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7457         #
7458         #  @ref tui_scale "Example"
7459         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7460             """
7461             Scale the given object by the factor, creating its copy before the scaling.
7462
7463             Parameters:
7464                 theObject The object to be scaled.
7465                 thePoint Center point for scaling.
7466                          Passing None for it means scaling relatively the origin of global CS.
7467                 theFactor Scaling factor value.
7468                 theName Object name; when specified, this parameter is used
7469                         for result publication in the study. Otherwise, if automatic
7470                         publication is switched on, default value is used for result name.
7471
7472             Returns:    
7473                 New GEOM.GEOM_Object, containing the scaled shape.
7474             """
7475             # Example: see GEOM_TestAll.py
7476             theFactor, Parameters = ParseParameters(theFactor)
7477             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7478             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7479             anObj.SetParameters(Parameters)
7480             self._autoPublish(anObj, theName, "scaled")
7481             return anObj
7482
7483         ## Scale the given object by different factors along coordinate axes.
7484         #  @param theObject The object to be scaled.
7485         #  @param thePoint Center point for scaling.
7486         #                  Passing None for it means scaling relatively the origin of global CS.
7487         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7488         #  @param theCopy Flag used to scale object itself or create a copy.
7489         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7490         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7491         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7492             """
7493             Scale the given object by different factors along coordinate axes.
7494
7495             Parameters:
7496                 theObject The object to be scaled.
7497                 thePoint Center point for scaling.
7498                             Passing None for it means scaling relatively the origin of global CS.
7499                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7500                 theCopy Flag used to scale object itself or create a copy.
7501
7502             Returns:    
7503                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7504                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7505             """
7506             # Example: see GEOM_TestAll.py
7507             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7508             if theCopy:
7509                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7510                                                             theFactorX, theFactorY, theFactorZ)
7511             else:
7512                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7513                                                         theFactorX, theFactorY, theFactorZ)
7514             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7515             anObj.SetParameters(Parameters)
7516             return anObj
7517
7518         ## Scale the given object by different factors along coordinate axes,
7519         #  creating its copy before the scaling.
7520         #  @param theObject The object to be scaled.
7521         #  @param thePoint Center point for scaling.
7522         #                  Passing None for it means scaling relatively the origin of global CS.
7523         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7524         #  @param theName Object name; when specified, this parameter is used
7525         #         for result publication in the study. Otherwise, if automatic
7526         #         publication is switched on, default value is used for result name.
7527         #
7528         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7529         #
7530         #  @ref swig_scale "Example"
7531         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7532             """
7533             Scale the given object by different factors along coordinate axes,
7534             creating its copy before the scaling.
7535
7536             Parameters:
7537                 theObject The object to be scaled.
7538                 thePoint Center point for scaling.
7539                             Passing None for it means scaling relatively the origin of global CS.
7540                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7541                 theName Object name; when specified, this parameter is used
7542                         for result publication in the study. Otherwise, if automatic
7543                         publication is switched on, default value is used for result name.
7544
7545             Returns:
7546                 New GEOM.GEOM_Object, containing the scaled shape.
7547             """
7548             # Example: see GEOM_TestAll.py
7549             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7550             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7551                                                         theFactorX, theFactorY, theFactorZ)
7552             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7553             anObj.SetParameters(Parameters)
7554             self._autoPublish(anObj, theName, "scaled")
7555             return anObj
7556
7557         ## Mirror an object relatively the given plane.
7558         #  @param theObject The object to be mirrored.
7559         #  @param thePlane Plane of symmetry.
7560         #  @param theCopy Flag used to mirror object itself or create a copy.
7561         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7562         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7563         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7564             """
7565             Mirror an object relatively the given plane.
7566
7567             Parameters:
7568                 theObject The object to be mirrored.
7569                 thePlane Plane of symmetry.
7570                 theCopy Flag used to mirror object itself or create a copy.
7571
7572             Returns:
7573                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7574                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7575             """
7576             if theCopy:
7577                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7578             else:
7579                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7580             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7581             return anObj
7582
7583         ## Create an object, symmetrical
7584         #  to the given one relatively the given plane.
7585         #  @param theObject The object to be mirrored.
7586         #  @param thePlane Plane of symmetry.
7587         #  @param theName Object name; when specified, this parameter is used
7588         #         for result publication in the study. Otherwise, if automatic
7589         #         publication is switched on, default value is used for result name.
7590         #
7591         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7592         #
7593         #  @ref tui_mirror "Example"
7594         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7595             """
7596             Create an object, symmetrical to the given one relatively the given plane.
7597
7598             Parameters:
7599                 theObject The object to be mirrored.
7600                 thePlane Plane of symmetry.
7601                 theName Object name; when specified, this parameter is used
7602                         for result publication in the study. Otherwise, if automatic
7603                         publication is switched on, default value is used for result name.
7604
7605             Returns:
7606                 New GEOM.GEOM_Object, containing the mirrored shape.
7607             """
7608             # Example: see GEOM_TestAll.py
7609             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7610             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7611             self._autoPublish(anObj, theName, "mirrored")
7612             return anObj
7613
7614         ## Mirror an object relatively the given axis.
7615         #  @param theObject The object to be mirrored.
7616         #  @param theAxis Axis of symmetry.
7617         #  @param theCopy Flag used to mirror object itself or create a copy.
7618         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7619         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7620         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7621             """
7622             Mirror an object relatively the given axis.
7623
7624             Parameters:
7625                 theObject The object to be mirrored.
7626                 theAxis Axis of symmetry.
7627                 theCopy Flag used to mirror object itself or create a copy.
7628
7629             Returns:
7630                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7631                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7632             """
7633             if theCopy:
7634                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7635             else:
7636                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7637             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7638             return anObj
7639
7640         ## Create an object, symmetrical
7641         #  to the given one relatively the given axis.
7642         #  @param theObject The object to be mirrored.
7643         #  @param theAxis Axis of symmetry.
7644         #  @param theName Object name; when specified, this parameter is used
7645         #         for result publication in the study. Otherwise, if automatic
7646         #         publication is switched on, default value is used for result name.
7647         #
7648         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7649         #
7650         #  @ref tui_mirror "Example"
7651         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7652             """
7653             Create an object, symmetrical to the given one relatively the given axis.
7654
7655             Parameters:
7656                 theObject The object to be mirrored.
7657                 theAxis Axis of symmetry.
7658                 theName Object name; when specified, this parameter is used
7659                         for result publication in the study. Otherwise, if automatic
7660                         publication is switched on, default value is used for result name.
7661
7662             Returns: 
7663                 New GEOM.GEOM_Object, containing the mirrored shape.
7664             """
7665             # Example: see GEOM_TestAll.py
7666             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7667             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7668             self._autoPublish(anObj, theName, "mirrored")
7669             return anObj
7670
7671         ## Mirror an object relatively the given point.
7672         #  @param theObject The object to be mirrored.
7673         #  @param thePoint Point of symmetry.
7674         #  @param theCopy Flag used to mirror object itself or create a copy.
7675         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7676         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7677         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7678             """
7679             Mirror an object relatively the given point.
7680
7681             Parameters:
7682                 theObject The object to be mirrored.
7683                 thePoint Point of symmetry.
7684                 theCopy Flag used to mirror object itself or create a copy.
7685
7686             Returns:
7687                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7688                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7689             """
7690             # Example: see GEOM_TestAll.py
7691             if theCopy:
7692                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7693             else:
7694                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7695             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7696             return anObj
7697
7698         ## Create an object, symmetrical
7699         #  to the given one relatively the given point.
7700         #  @param theObject The object to be mirrored.
7701         #  @param thePoint Point of symmetry.
7702         #  @param theName Object name; when specified, this parameter is used
7703         #         for result publication in the study. Otherwise, if automatic
7704         #         publication is switched on, default value is used for result name.
7705         #
7706         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7707         #
7708         #  @ref tui_mirror "Example"
7709         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7710             """
7711             Create an object, symmetrical
7712             to the given one relatively the given point.
7713
7714             Parameters:
7715                 theObject The object to be mirrored.
7716                 thePoint Point of symmetry.
7717                 theName Object name; when specified, this parameter is used
7718                         for result publication in the study. Otherwise, if automatic
7719                         publication is switched on, default value is used for result name.
7720
7721             Returns:  
7722                 New GEOM.GEOM_Object, containing the mirrored shape.
7723             """
7724             # Example: see GEOM_TestAll.py
7725             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7726             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7727             self._autoPublish(anObj, theName, "mirrored")
7728             return anObj
7729
7730         ## Modify the location of the given object.
7731         #  @param theObject The object to be displaced.
7732         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7733         #                     If \a theStartLCS is NULL, displacement
7734         #                     will be performed from global CS.\n
7735         #                     If \a theObject itself is used as \a theStartLCS,
7736         #                     its location will be changed to \a theEndLCS.
7737         #  @param theEndLCS Coordinate system to perform displacement to it.
7738         #  @param theCopy Flag used to displace object itself or create a copy.
7739         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7740         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7741         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7742             """
7743             Modify the Location of the given object by LCS, creating its copy before the setting.
7744
7745             Parameters:
7746                 theObject The object to be displaced.
7747                 theStartLCS Coordinate system to perform displacement from it.
7748                             If theStartLCS is NULL, displacement
7749                             will be performed from global CS.
7750                             If theObject itself is used as theStartLCS,
7751                             its location will be changed to theEndLCS.
7752                 theEndLCS Coordinate system to perform displacement to it.
7753                 theCopy Flag used to displace object itself or create a copy.
7754
7755             Returns:
7756                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7757                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7758             """
7759             # Example: see GEOM_TestAll.py
7760             if theCopy:
7761                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7762             else:
7763                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7764             RaiseIfFailed("Displace", self.TrsfOp)
7765             return anObj
7766
7767         ## Modify the Location of the given object by LCS,
7768         #  creating its copy before the setting.
7769         #  @param theObject The object to be displaced.
7770         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7771         #                     If \a theStartLCS is NULL, displacement
7772         #                     will be performed from global CS.\n
7773         #                     If \a theObject itself is used as \a theStartLCS,
7774         #                     its location will be changed to \a theEndLCS.
7775         #  @param theEndLCS Coordinate system to perform displacement to it.
7776         #  @param theName Object name; when specified, this parameter is used
7777         #         for result publication in the study. Otherwise, if automatic
7778         #         publication is switched on, default value is used for result name.
7779         #
7780         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7781         #
7782         #  @ref tui_modify_location "Example"
7783         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7784             """
7785             Modify the Location of the given object by LCS, creating its copy before the setting.
7786
7787             Parameters:
7788                 theObject The object to be displaced.
7789                 theStartLCS Coordinate system to perform displacement from it.
7790                             If theStartLCS is NULL, displacement
7791                             will be performed from global CS.
7792                             If theObject itself is used as theStartLCS,
7793                             its location will be changed to theEndLCS.
7794                 theEndLCS Coordinate system to perform displacement to it.
7795                 theName Object name; when specified, this parameter is used
7796                         for result publication in the study. Otherwise, if automatic
7797                         publication is switched on, default value is used for result name.
7798
7799             Returns:  
7800                 New GEOM.GEOM_Object, containing the displaced shape.
7801
7802             Example of usage:
7803                 # create local coordinate systems
7804                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7805                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7806                 # modify the location of the given object
7807                 position = geompy.MakePosition(cylinder, cs1, cs2)
7808             """
7809             # Example: see GEOM_TestAll.py
7810             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7811             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7812             self._autoPublish(anObj, theName, "displaced")
7813             return anObj
7814
7815         ## Modify the Location of the given object by Path.
7816         #  @param  theObject The object to be displaced.
7817         #  @param  thePath Wire or Edge along that the object will be translated.
7818         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7819         #  @param  theCopy is to create a copy objects if true.
7820         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7821         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7822         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7823         #
7824         #  @ref tui_modify_location "Example"
7825         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7826             """
7827             Modify the Location of the given object by Path.
7828
7829             Parameters:
7830                  theObject The object to be displaced.
7831                  thePath Wire or Edge along that the object will be translated.
7832                  theDistance progress of Path (0 = start location, 1 = end of path location).
7833                  theCopy is to create a copy objects if true.
7834                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7835
7836             Returns:  
7837                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7838                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7839
7840             Example of usage:
7841                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7842             """
7843             # Example: see GEOM_TestAll.py
7844             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7845             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7846             return anObj
7847
7848         ## Modify the Location of the given object by Path, creating its copy before the operation.
7849         #  @param theObject The object to be displaced.
7850         #  @param thePath Wire or Edge along that the object will be translated.
7851         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7852         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7853         #  @param theName Object name; when specified, this parameter is used
7854         #         for result publication in the study. Otherwise, if automatic
7855         #         publication is switched on, default value is used for result name.
7856         #
7857         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7858         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7859             """
7860             Modify the Location of the given object by Path, creating its copy before the operation.
7861
7862             Parameters:
7863                  theObject The object to be displaced.
7864                  thePath Wire or Edge along that the object will be translated.
7865                  theDistance progress of Path (0 = start location, 1 = end of path location).
7866                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7867                  theName Object name; when specified, this parameter is used
7868                          for result publication in the study. Otherwise, if automatic
7869                          publication is switched on, default value is used for result name.
7870
7871             Returns:  
7872                 New GEOM.GEOM_Object, containing the displaced shape.
7873             """
7874             # Example: see GEOM_TestAll.py
7875             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7876             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7877             self._autoPublish(anObj, theName, "displaced")
7878             return anObj
7879
7880         ## Offset given shape.
7881         #  @param theObject The base object for the offset.
7882         #  @param theOffset Offset value.
7883         #  @param theCopy Flag used to offset object itself or create a copy.
7884         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7885         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7886         def Offset(self, theObject, theOffset, theCopy=False):
7887             """
7888             Offset given shape.
7889
7890             Parameters:
7891                 theObject The base object for the offset.
7892                 theOffset Offset value.
7893                 theCopy Flag used to offset object itself or create a copy.
7894
7895             Returns: 
7896                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7897                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7898             """
7899             theOffset, Parameters = ParseParameters(theOffset)
7900             if theCopy:
7901                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7902             else:
7903                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7904             RaiseIfFailed("Offset", self.TrsfOp)
7905             anObj.SetParameters(Parameters)
7906             return anObj
7907
7908         ## Create new object as offset of the given one.
7909         #  @param theObject The base object for the offset.
7910         #  @param theOffset Offset value.
7911         #  @param theName Object name; when specified, this parameter is used
7912         #         for result publication in the study. Otherwise, if automatic
7913         #         publication is switched on, default value is used for result name.
7914         #
7915         #  @return New GEOM.GEOM_Object, containing the offset object.
7916         #
7917         #  @ref tui_offset "Example"
7918         def MakeOffset(self, theObject, theOffset, theName=None):
7919             """
7920             Create new object as offset of the given one.
7921
7922             Parameters:
7923                 theObject The base object for the offset.
7924                 theOffset Offset value.
7925                 theName Object name; when specified, this parameter is used
7926                         for result publication in the study. Otherwise, if automatic
7927                         publication is switched on, default value is used for result name.
7928
7929             Returns:  
7930                 New GEOM.GEOM_Object, containing the offset object.
7931
7932             Example of usage:
7933                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7934                  # create a new object as offset of the given object
7935                  offset = geompy.MakeOffset(box, 70.)
7936             """
7937             # Example: see GEOM_TestAll.py
7938             theOffset, Parameters = ParseParameters(theOffset)
7939             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7940             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7941             anObj.SetParameters(Parameters)
7942             self._autoPublish(anObj, theName, "offset")
7943             return anObj
7944
7945         ## Create new object as projection of the given one on a 2D surface.
7946         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7947         #  @param theTarget The target object. It can be planar or cylindrical face.
7948         #  @param theName Object name; when specified, this parameter is used
7949         #         for result publication in the study. Otherwise, if automatic
7950         #         publication is switched on, default value is used for result name.
7951         #
7952         #  @return New GEOM.GEOM_Object, containing the projection.
7953         #
7954         #  @ref tui_projection "Example"
7955         def MakeProjection(self, theSource, theTarget, theName=None):
7956             """
7957             Create new object as projection of the given one on a 2D surface.
7958
7959             Parameters:
7960                 theSource The source object for the projection. It can be a point, edge or wire.
7961                 theTarget The target object. It can be planar or cylindrical face.
7962                 theName Object name; when specified, this parameter is used
7963                         for result publication in the study. Otherwise, if automatic
7964                         publication is switched on, default value is used for result name.
7965
7966             Returns:  
7967                 New GEOM.GEOM_Object, containing the projection.
7968             """
7969             # Example: see GEOM_TestAll.py
7970             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7971             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7972             self._autoPublish(anObj, theName, "projection")
7973             return anObj
7974
7975         # -----------------------------------------------------------------------------
7976         # Patterns
7977         # -----------------------------------------------------------------------------
7978
7979         ## Translate the given object along the given vector a given number times
7980         #  @param theObject The object to be translated.
7981         #  @param theVector Direction of the translation. DX if None.
7982         #  @param theStep Distance to translate on.
7983         #  @param theNbTimes Quantity of translations to be done.
7984         #  @param theName Object name; when specified, this parameter is used
7985         #         for result publication in the study. Otherwise, if automatic
7986         #         publication is switched on, default value is used for result name.
7987         #
7988         #  @return New GEOM.GEOM_Object, containing compound of all
7989         #          the shapes, obtained after each translation.
7990         #
7991         #  @ref tui_multi_translation "Example"
7992         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
7993             """
7994             Translate the given object along the given vector a given number times
7995
7996             Parameters:
7997                 theObject The object to be translated.
7998                 theVector Direction of the translation. DX if None.
7999                 theStep Distance to translate on.
8000                 theNbTimes Quantity of translations to be done.
8001                 theName Object name; when specified, this parameter is used
8002                         for result publication in the study. Otherwise, if automatic
8003                         publication is switched on, default value is used for result name.
8004
8005             Returns:     
8006                 New GEOM.GEOM_Object, containing compound of all
8007                 the shapes, obtained after each translation.
8008
8009             Example of usage:
8010                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8011             """
8012             # Example: see GEOM_TestAll.py
8013             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8014             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8015             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8016             anObj.SetParameters(Parameters)
8017             self._autoPublish(anObj, theName, "multitranslation")
8018             return anObj
8019
8020         ## Conseqently apply two specified translations to theObject specified number of times.
8021         #  @param theObject The object to be translated.
8022         #  @param theVector1 Direction of the first translation. DX if None.
8023         #  @param theStep1 Step of the first translation.
8024         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8025         #  @param theVector2 Direction of the second translation. DY if None.
8026         #  @param theStep2 Step of the second translation.
8027         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8028         #  @param theName Object name; when specified, this parameter is used
8029         #         for result publication in the study. Otherwise, if automatic
8030         #         publication is switched on, default value is used for result name.
8031         #
8032         #  @return New GEOM.GEOM_Object, containing compound of all
8033         #          the shapes, obtained after each translation.
8034         #
8035         #  @ref tui_multi_translation "Example"
8036         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8037                                    theVector2, theStep2, theNbTimes2, theName=None):
8038             """
8039             Conseqently apply two specified translations to theObject specified number of times.
8040
8041             Parameters:
8042                 theObject The object to be translated.
8043                 theVector1 Direction of the first translation. DX if None.
8044                 theStep1 Step of the first translation.
8045                 theNbTimes1 Quantity of translations to be done along theVector1.
8046                 theVector2 Direction of the second translation. DY if None.
8047                 theStep2 Step of the second translation.
8048                 theNbTimes2 Quantity of translations to be done along theVector2.
8049                 theName Object name; when specified, this parameter is used
8050                         for result publication in the study. Otherwise, if automatic
8051                         publication is switched on, default value is used for result name.
8052
8053             Returns:
8054                 New GEOM.GEOM_Object, containing compound of all
8055                 the shapes, obtained after each translation.
8056
8057             Example of usage:
8058                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8059             """
8060             # Example: see GEOM_TestAll.py
8061             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8062             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8063                                                  theVector2, theStep2, theNbTimes2)
8064             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8065             anObj.SetParameters(Parameters)
8066             self._autoPublish(anObj, theName, "multitranslation")
8067             return anObj
8068
8069         ## Rotate the given object around the given axis a given number times.
8070         #  Rotation angle will be 2*PI/theNbTimes.
8071         #  @param theObject The object to be rotated.
8072         #  @param theAxis The rotation axis. DZ if None.
8073         #  @param theNbTimes Quantity of rotations to be done.
8074         #  @param theName Object name; when specified, this parameter is used
8075         #         for result publication in the study. Otherwise, if automatic
8076         #         publication is switched on, default value is used for result name.
8077         #
8078         #  @return New GEOM.GEOM_Object, containing compound of all the
8079         #          shapes, obtained after each rotation.
8080         #
8081         #  @ref tui_multi_rotation "Example"
8082         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8083             """
8084             Rotate the given object around the given axis a given number times.
8085             Rotation angle will be 2*PI/theNbTimes.
8086
8087             Parameters:
8088                 theObject The object to be rotated.
8089                 theAxis The rotation axis. DZ if None.
8090                 theNbTimes Quantity of rotations to be done.
8091                 theName Object name; when specified, this parameter is used
8092                         for result publication in the study. Otherwise, if automatic
8093                         publication is switched on, default value is used for result name.
8094
8095             Returns:     
8096                 New GEOM.GEOM_Object, containing compound of all the
8097                 shapes, obtained after each rotation.
8098
8099             Example of usage:
8100                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8101             """
8102             # Example: see GEOM_TestAll.py
8103             theNbTimes, Parameters = ParseParameters(theNbTimes)
8104             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8105             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8106             anObj.SetParameters(Parameters)
8107             self._autoPublish(anObj, theName, "multirotation")
8108             return anObj
8109
8110         ## Rotate the given object around the given axis
8111         #  a given number times on the given angle.
8112         #  @param theObject The object to be rotated.
8113         #  @param theAxis The rotation axis. DZ if None.
8114         #  @param theAngleStep Rotation angle in radians.
8115         #  @param theNbTimes Quantity of rotations to be done.
8116         #  @param theName Object name; when specified, this parameter is used
8117         #         for result publication in the study. Otherwise, if automatic
8118         #         publication is switched on, default value is used for result name.
8119         #
8120         #  @return New GEOM.GEOM_Object, containing compound of all the
8121         #          shapes, obtained after each rotation.
8122         #
8123         #  @ref tui_multi_rotation "Example"
8124         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8125             """
8126             Rotate the given object around the given axis
8127             a given number times on the given angle.
8128
8129             Parameters:
8130                 theObject The object to be rotated.
8131                 theAxis The rotation axis. DZ if None.
8132                 theAngleStep Rotation angle in radians.
8133                 theNbTimes Quantity of rotations to be done.
8134                 theName Object name; when specified, this parameter is used
8135                         for result publication in the study. Otherwise, if automatic
8136                         publication is switched on, default value is used for result name.
8137
8138             Returns:     
8139                 New GEOM.GEOM_Object, containing compound of all the
8140                 shapes, obtained after each rotation.
8141
8142             Example of usage:
8143                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8144             """
8145             # Example: see GEOM_TestAll.py
8146             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8147             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8148             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8149             anObj.SetParameters(Parameters)
8150             self._autoPublish(anObj, theName, "multirotation")
8151             return anObj
8152
8153         ## Rotate the given object around the given axis a given
8154         #  number times and multi-translate each rotation result.
8155         #  Rotation angle will be 2*PI/theNbTimes1.
8156         #  Translation direction passes through center of gravity
8157         #  of rotated shape and its projection on the rotation axis.
8158         #  @param theObject The object to be rotated.
8159         #  @param theAxis Rotation axis. DZ if None.
8160         #  @param theNbTimes1 Quantity of rotations to be done.
8161         #  @param theRadialStep Translation distance.
8162         #  @param theNbTimes2 Quantity of translations to be done.
8163         #  @param theName Object name; when specified, this parameter is used
8164         #         for result publication in the study. Otherwise, if automatic
8165         #         publication is switched on, default value is used for result name.
8166         #
8167         #  @return New GEOM.GEOM_Object, containing compound of all the
8168         #          shapes, obtained after each transformation.
8169         #
8170         #  @ref tui_multi_rotation "Example"
8171         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8172             """
8173             Rotate the given object around the
8174             given axis on the given angle a given number
8175             times and multi-translate each rotation result.
8176             Translation direction passes through center of gravity
8177             of rotated shape and its projection on the rotation axis.
8178
8179             Parameters:
8180                 theObject The object to be rotated.
8181                 theAxis Rotation axis. DZ if None.
8182                 theNbTimes1 Quantity of rotations to be done.
8183                 theRadialStep Translation distance.
8184                 theNbTimes2 Quantity of translations to be done.
8185                 theName Object name; when specified, this parameter is used
8186                         for result publication in the study. Otherwise, if automatic
8187                         publication is switched on, default value is used for result name.
8188
8189             Returns:    
8190                 New GEOM.GEOM_Object, containing compound of all the
8191                 shapes, obtained after each transformation.
8192
8193             Example of usage:
8194                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8195             """
8196             # Example: see GEOM_TestAll.py
8197             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8198             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8199             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8200             anObj.SetParameters(Parameters)
8201             self._autoPublish(anObj, theName, "multirotation")
8202             return anObj
8203
8204         ## Rotate the given object around the
8205         #  given axis on the given angle a given number
8206         #  times and multi-translate each rotation result.
8207         #  Translation direction passes through center of gravity
8208         #  of rotated shape and its projection on the rotation axis.
8209         #  @param theObject The object to be rotated.
8210         #  @param theAxis Rotation axis. DZ if None.
8211         #  @param theAngleStep Rotation angle in radians.
8212         #  @param theNbTimes1 Quantity of rotations to be done.
8213         #  @param theRadialStep Translation distance.
8214         #  @param theNbTimes2 Quantity of translations to be done.
8215         #  @param theName Object name; when specified, this parameter is used
8216         #         for result publication in the study. Otherwise, if automatic
8217         #         publication is switched on, default value is used for result name.
8218         #
8219         #  @return New GEOM.GEOM_Object, containing compound of all the
8220         #          shapes, obtained after each transformation.
8221         #
8222         #  @ref tui_multi_rotation "Example"
8223         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8224             """
8225             Rotate the given object around the
8226             given axis on the given angle a given number
8227             times and multi-translate each rotation result.
8228             Translation direction passes through center of gravity
8229             of rotated shape and its projection on the rotation axis.
8230
8231             Parameters:
8232                 theObject The object to be rotated.
8233                 theAxis Rotation axis. DZ if None.
8234                 theAngleStep Rotation angle in radians.
8235                 theNbTimes1 Quantity of rotations to be done.
8236                 theRadialStep Translation distance.
8237                 theNbTimes2 Quantity of translations to be done.
8238                 theName Object name; when specified, this parameter is used
8239                         for result publication in the study. Otherwise, if automatic
8240                         publication is switched on, default value is used for result name.
8241
8242             Returns:    
8243                 New GEOM.GEOM_Object, containing compound of all the
8244                 shapes, obtained after each transformation.
8245
8246             Example of usage:
8247                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8248             """
8249             # Example: see GEOM_TestAll.py
8250             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8251             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8252             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8253             anObj.SetParameters(Parameters)
8254             self._autoPublish(anObj, theName, "multirotation")
8255             return anObj
8256
8257         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8258         #
8259         #  @ref swig_MakeMultiRotation "Example"
8260         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8261             """
8262             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8263
8264             Example of usage:
8265                 pz = geompy.MakeVertex(0, 0, 100)
8266                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8267                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8268             """
8269             # Example: see GEOM_TestOthers.py
8270             aVec = self.MakeLine(aPoint,aDir)
8271             # note: auto-publishing is done in self.MultiRotate1D()
8272             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8273             return anObj
8274
8275         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8276         #
8277         #  @ref swig_MakeMultiRotation "Example"
8278         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8279             """
8280             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8281
8282             Example of usage:
8283                 pz = geompy.MakeVertex(0, 0, 100)
8284                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8285                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8286             """
8287             # Example: see GEOM_TestOthers.py
8288             aVec = self.MakeLine(aPoint,aDir)
8289             # note: auto-publishing is done in self.MultiRotate1D()
8290             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8291             return anObj
8292
8293         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8294         #
8295         #  @ref swig_MakeMultiRotation "Example"
8296         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8297             """
8298             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8299             
8300             Example of usage:
8301                 pz = geompy.MakeVertex(0, 0, 100)
8302                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8303                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8304             """
8305             # Example: see GEOM_TestOthers.py
8306             aVec = self.MakeLine(aPoint,aDir)
8307             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8308             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8309             return anObj
8310
8311         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8312         #
8313         #  @ref swig_MakeMultiRotation "Example"
8314         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8315             """
8316             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8317             
8318             Example of usage:
8319                 pz = geompy.MakeVertex(0, 0, 100)
8320                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8321                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8322             """
8323             # Example: see GEOM_TestOthers.py
8324             aVec = self.MakeLine(aPoint,aDir)
8325             # note: auto-publishing is done in self.MultiRotate2D()
8326             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8327             return anObj
8328
8329         # end of l3_transform
8330         ## @}
8331
8332         ## @addtogroup l3_transform_d
8333         ## @{
8334
8335         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8336         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8337             """
8338             Deprecated method. Use MultiRotate1DNbTimes instead.
8339             """
8340             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8341             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8342
8343         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8344         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8345         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8346             """
8347             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8348             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8349
8350             Example of usage:
8351                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8352             """
8353             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8354             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8355             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8356             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8357             anObj.SetParameters(Parameters)
8358             self._autoPublish(anObj, theName, "multirotation")
8359             return anObj
8360
8361         ## The same, as MultiRotate1D(), but axis is given by direction and point
8362         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8363         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8364             """
8365             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8366             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8367
8368             Example of usage:
8369                 pz = geompy.MakeVertex(0, 0, 100)
8370                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8371                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8372             """
8373             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8374             aVec = self.MakeLine(aPoint,aDir)
8375             # note: auto-publishing is done in self.MultiRotate1D()
8376             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8377             return anObj
8378
8379         ## The same, as MultiRotate2D(), but axis is given by direction and point
8380         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8381         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8382             """
8383             The same, as MultiRotate2D(), but axis is given by direction and point
8384             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8385             
8386             Example of usage:
8387                 pz = geompy.MakeVertex(0, 0, 100)
8388                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8389                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8390             """
8391             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8392             aVec = self.MakeLine(aPoint,aDir)
8393             # note: auto-publishing is done in self.MultiRotate2D()
8394             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8395             return anObj
8396
8397         # end of l3_transform_d
8398         ## @}
8399
8400         ## @addtogroup l3_local
8401         ## @{
8402
8403         ## Perform a fillet on all edges of the given shape.
8404         #  @param theShape Shape, to perform fillet on.
8405         #  @param theR Fillet radius.
8406         #  @param theName Object name; when specified, this parameter is used
8407         #         for result publication in the study. Otherwise, if automatic
8408         #         publication is switched on, default value is used for result name.
8409         #
8410         #  @return New GEOM.GEOM_Object, containing the result shape.
8411         #
8412         #  @ref tui_fillet "Example 1"
8413         #  \n @ref swig_MakeFilletAll "Example 2"
8414         def MakeFilletAll(self, theShape, theR, theName=None):
8415             """
8416             Perform a fillet on all edges of the given shape.
8417
8418             Parameters:
8419                 theShape Shape, to perform fillet on.
8420                 theR Fillet radius.
8421                 theName Object name; when specified, this parameter is used
8422                         for result publication in the study. Otherwise, if automatic
8423                         publication is switched on, default value is used for result name.
8424
8425             Returns: 
8426                 New GEOM.GEOM_Object, containing the result shape.
8427
8428             Example of usage: 
8429                filletall = geompy.MakeFilletAll(prism, 10.)
8430             """
8431             # Example: see GEOM_TestOthers.py
8432             theR,Parameters = ParseParameters(theR)
8433             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8434             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8435             anObj.SetParameters(Parameters)
8436             self._autoPublish(anObj, theName, "fillet")
8437             return anObj
8438
8439         ## Perform a fillet on the specified edges/faces of the given shape
8440         #  @param theShape Shape, to perform fillet on.
8441         #  @param theR Fillet radius.
8442         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8443         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8444         #  @param theName Object name; when specified, this parameter is used
8445         #         for result publication in the study. Otherwise, if automatic
8446         #         publication is switched on, default value is used for result name.
8447         #
8448         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8449         #
8450         #  @return New GEOM.GEOM_Object, containing the result shape.
8451         #
8452         #  @ref tui_fillet "Example"
8453         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8454             """
8455             Perform a fillet on the specified edges/faces of the given shape
8456
8457             Parameters:
8458                 theShape Shape, to perform fillet on.
8459                 theR Fillet radius.
8460                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8461                 theListShapes Global indices of edges/faces to perform fillet on.
8462                 theName Object name; when specified, this parameter is used
8463                         for result publication in the study. Otherwise, if automatic
8464                         publication is switched on, default value is used for result name.
8465
8466             Note:
8467                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8468
8469             Returns: 
8470                 New GEOM.GEOM_Object, containing the result shape.
8471
8472             Example of usage:
8473                 # get the list of IDs (IDList) for the fillet
8474                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8475                 IDlist_e = []
8476                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8477                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8478                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8479                 # make a fillet on the specified edges of the given shape
8480                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8481             """
8482             # Example: see GEOM_TestAll.py
8483             theR,Parameters = ParseParameters(theR)
8484             anObj = None
8485             if theShapeType == self.ShapeType["EDGE"]:
8486                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8487                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8488             else:
8489                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8490                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8491             anObj.SetParameters(Parameters)
8492             self._autoPublish(anObj, theName, "fillet")
8493             return anObj
8494
8495         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8496         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8497             """
8498             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8499
8500             Example of usage:
8501                 # get the list of IDs (IDList) for the fillet
8502                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8503                 IDlist_e = []
8504                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8505                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8506                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8507                 # make a fillet on the specified edges of the given shape
8508                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8509             """
8510             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8511             anObj = None
8512             if theShapeType == self.ShapeType["EDGE"]:
8513                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8514                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8515             else:
8516                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8517                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8518             anObj.SetParameters(Parameters)
8519             self._autoPublish(anObj, theName, "fillet")
8520             return anObj
8521
8522         ## Perform a fillet on the specified edges of the given shape
8523         #  @param theShape  Wire Shape to perform fillet on.
8524         #  @param theR  Fillet radius.
8525         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8526         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8527         #    \note The list of vertices could be empty,
8528         #          in this case fillet will done done at all vertices in wire
8529         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8530         #         by the length of the edges, nearest to the fillet vertex.
8531         #         But sometimes the next edge is C1 continuous with the one, nearest to
8532         #         the fillet point, and such two (or more) edges can be united to allow
8533         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8534         #         thus ignoring the secant vertex (vertices).
8535         #  @param theName Object name; when specified, this parameter is used
8536         #         for result publication in the study. Otherwise, if automatic
8537         #         publication is switched on, default value is used for result name.
8538         #
8539         #  @return New GEOM.GEOM_Object, containing the result shape.
8540         #
8541         #  @ref tui_fillet2d "Example"
8542         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8543             """
8544             Perform a fillet on the specified edges of the given shape
8545
8546             Parameters:
8547                 theShape  Wire Shape to perform fillet on.
8548                 theR  Fillet radius.
8549                 theListOfVertexes Global indices of vertexes to perform fillet on.
8550                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8551                     by the length of the edges, nearest to the fillet vertex.
8552                     But sometimes the next edge is C1 continuous with the one, nearest to
8553                     the fillet point, and such two (or more) edges can be united to allow
8554                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8555                     thus ignoring the secant vertex (vertices).
8556                 theName Object name; when specified, this parameter is used
8557                         for result publication in the study. Otherwise, if automatic
8558                         publication is switched on, default value is used for result name.
8559             Note:
8560                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8561
8562                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8563
8564             Returns: 
8565                 New GEOM.GEOM_Object, containing the result shape.
8566
8567             Example of usage:  
8568                 # create wire
8569                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8570                 # make fillet at given wire vertices with giver radius
8571                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8572             """
8573             # Example: see GEOM_TestAll.py
8574             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8575             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8576             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8577             anObj.SetParameters(Parameters)
8578             self._autoPublish(anObj, theName, "fillet")
8579             return anObj
8580
8581         ## Perform a fillet at the specified vertices of the given face/shell.
8582         #  @param theShape Face or Shell shape to perform fillet on.
8583         #  @param theR Fillet radius.
8584         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8585         #  @param theName Object name; when specified, this parameter is used
8586         #         for result publication in the study. Otherwise, if automatic
8587         #         publication is switched on, default value is used for result name.
8588         #
8589         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8590         #
8591         #  @return New GEOM.GEOM_Object, containing the result shape.
8592         #
8593         #  @ref tui_fillet2d "Example"
8594         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8595             """
8596             Perform a fillet at the specified vertices of the given face/shell.
8597
8598             Parameters:
8599                 theShape  Face or Shell shape to perform fillet on.
8600                 theR  Fillet radius.
8601                 theListOfVertexes Global indices of vertexes to perform fillet on.
8602                 theName Object name; when specified, this parameter is used
8603                         for result publication in the study. Otherwise, if automatic
8604                         publication is switched on, default value is used for result name.
8605             Note:
8606                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8607
8608             Returns: 
8609                 New GEOM.GEOM_Object, containing the result shape.
8610
8611             Example of usage:
8612                 face = geompy.MakeFaceHW(100, 100, 1)
8613                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8614             """
8615             # Example: see GEOM_TestAll.py
8616             theR,Parameters = ParseParameters(theR)
8617             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8618             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8619             anObj.SetParameters(Parameters)
8620             self._autoPublish(anObj, theName, "fillet")
8621             return anObj
8622
8623         ## Perform a symmetric chamfer on all edges of the given shape.
8624         #  @param theShape Shape, to perform chamfer on.
8625         #  @param theD Chamfer size along each face.
8626         #  @param theName Object name; when specified, this parameter is used
8627         #         for result publication in the study. Otherwise, if automatic
8628         #         publication is switched on, default value is used for result name.
8629         #
8630         #  @return New GEOM.GEOM_Object, containing the result shape.
8631         #
8632         #  @ref tui_chamfer "Example 1"
8633         #  \n @ref swig_MakeChamferAll "Example 2"
8634         def MakeChamferAll(self, theShape, theD, theName=None):
8635             """
8636             Perform a symmetric chamfer on all edges of the given shape.
8637
8638             Parameters:
8639                 theShape Shape, to perform chamfer on.
8640                 theD Chamfer size along each face.
8641                 theName Object name; when specified, this parameter is used
8642                         for result publication in the study. Otherwise, if automatic
8643                         publication is switched on, default value is used for result name.
8644
8645             Returns:     
8646                 New GEOM.GEOM_Object, containing the result shape.
8647
8648             Example of usage:
8649                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8650             """
8651             # Example: see GEOM_TestOthers.py
8652             theD,Parameters = ParseParameters(theD)
8653             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8654             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8655             anObj.SetParameters(Parameters)
8656             self._autoPublish(anObj, theName, "chamfer")
8657             return anObj
8658
8659         ## Perform a chamfer on edges, common to the specified faces,
8660         #  with distance D1 on the Face1
8661         #  @param theShape Shape, to perform chamfer on.
8662         #  @param theD1 Chamfer size along \a theFace1.
8663         #  @param theD2 Chamfer size along \a theFace2.
8664         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8665         #  @param theName Object name; when specified, this parameter is used
8666         #         for result publication in the study. Otherwise, if automatic
8667         #         publication is switched on, default value is used for result name.
8668         #
8669         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8670         #
8671         #  @return New GEOM.GEOM_Object, containing the result shape.
8672         #
8673         #  @ref tui_chamfer "Example"
8674         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8675             """
8676             Perform a chamfer on edges, common to the specified faces,
8677             with distance D1 on the Face1
8678
8679             Parameters:
8680                 theShape Shape, to perform chamfer on.
8681                 theD1 Chamfer size along theFace1.
8682                 theD2 Chamfer size along theFace2.
8683                 theFace1,theFace2 Global indices of two faces of theShape.
8684                 theName Object name; when specified, this parameter is used
8685                         for result publication in the study. Otherwise, if automatic
8686                         publication is switched on, default value is used for result name.
8687
8688             Note:
8689                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8690
8691             Returns:      
8692                 New GEOM.GEOM_Object, containing the result shape.
8693
8694             Example of usage:
8695                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8696                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8697                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8698                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8699             """
8700             # Example: see GEOM_TestAll.py
8701             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8702             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8703             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8704             anObj.SetParameters(Parameters)
8705             self._autoPublish(anObj, theName, "chamfer")
8706             return anObj
8707
8708         ## Perform a chamfer on edges
8709         #  @param theShape Shape, to perform chamfer on.
8710         #  @param theD Chamfer length
8711         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8712         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8713         #  @param theName Object name; when specified, this parameter is used
8714         #         for result publication in the study. Otherwise, if automatic
8715         #         publication is switched on, default value is used for result name.
8716         #
8717         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8718         #
8719         #  @return New GEOM.GEOM_Object, containing the result shape.
8720         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8721             """
8722             Perform a chamfer on edges
8723
8724             Parameters:
8725                 theShape Shape, to perform chamfer on.
8726                 theD1 Chamfer size along theFace1.
8727                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8728                 theFace1,theFace2 Global indices of two faces of theShape.
8729                 theName Object name; when specified, this parameter is used
8730                         for result publication in the study. Otherwise, if automatic
8731                         publication is switched on, default value is used for result name.
8732
8733             Note:
8734                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8735
8736             Returns:      
8737                 New GEOM.GEOM_Object, containing the result shape.
8738
8739             Example of usage:
8740                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8741                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8742                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8743                 ang = 30
8744                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8745             """
8746             flag = False
8747             if isinstance(theAngle,str):
8748                 flag = True
8749             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8750             if flag:
8751                 theAngle = theAngle*math.pi/180.0
8752             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8753             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8754             anObj.SetParameters(Parameters)
8755             self._autoPublish(anObj, theName, "chamfer")
8756             return anObj
8757
8758         ## Perform a chamfer on all edges of the specified faces,
8759         #  with distance D1 on the first specified face (if several for one edge)
8760         #  @param theShape Shape, to perform chamfer on.
8761         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8762         #               connected to the edge, are in \a theFaces, \a theD1
8763         #               will be get along face, which is nearer to \a theFaces beginning.
8764         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8765         #  @param theFaces Sequence of global indices of faces of \a theShape.
8766         #  @param theName Object name; when specified, this parameter is used
8767         #         for result publication in the study. Otherwise, if automatic
8768         #         publication is switched on, default value is used for result name.
8769         #
8770         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8771         #
8772         #  @return New GEOM.GEOM_Object, containing the result shape.
8773         #
8774         #  @ref tui_chamfer "Example"
8775         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8776             """
8777             Perform a chamfer on all edges of the specified faces,
8778             with distance D1 on the first specified face (if several for one edge)
8779
8780             Parameters:
8781                 theShape Shape, to perform chamfer on.
8782                 theD1 Chamfer size along face from  theFaces. If both faces,
8783                       connected to the edge, are in theFaces, theD1
8784                       will be get along face, which is nearer to theFaces beginning.
8785                 theD2 Chamfer size along another of two faces, connected to the edge.
8786                 theFaces Sequence of global indices of faces of theShape.
8787                 theName Object name; when specified, this parameter is used
8788                         for result publication in the study. Otherwise, if automatic
8789                         publication is switched on, default value is used for result name.
8790                 
8791             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8792
8793             Returns:  
8794                 New GEOM.GEOM_Object, containing the result shape.
8795             """
8796             # Example: see GEOM_TestAll.py
8797             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8798             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8799             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8800             anObj.SetParameters(Parameters)
8801             self._autoPublish(anObj, theName, "chamfer")
8802             return anObj
8803
8804         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8805         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8806         #
8807         #  @ref swig_FilletChamfer "Example"
8808         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8809             """
8810             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8811             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8812             """
8813             flag = False
8814             if isinstance(theAngle,str):
8815                 flag = True
8816             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8817             if flag:
8818                 theAngle = theAngle*math.pi/180.0
8819             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8820             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8821             anObj.SetParameters(Parameters)
8822             self._autoPublish(anObj, theName, "chamfer")
8823             return anObj
8824
8825         ## Perform a chamfer on edges,
8826         #  with distance D1 on the first specified face (if several for one edge)
8827         #  @param theShape Shape, to perform chamfer on.
8828         #  @param theD1,theD2 Chamfer size
8829         #  @param theEdges Sequence of edges of \a theShape.
8830         #  @param theName Object name; when specified, this parameter is used
8831         #         for result publication in the study. Otherwise, if automatic
8832         #         publication is switched on, default value is used for result name.
8833         #
8834         #  @return New GEOM.GEOM_Object, containing the result shape.
8835         #
8836         #  @ref swig_FilletChamfer "Example"
8837         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8838             """
8839             Perform a chamfer on edges,
8840             with distance D1 on the first specified face (if several for one edge)
8841             
8842             Parameters:
8843                 theShape Shape, to perform chamfer on.
8844                 theD1,theD2 Chamfer size
8845                 theEdges Sequence of edges of theShape.
8846                 theName Object name; when specified, this parameter is used
8847                         for result publication in the study. Otherwise, if automatic
8848                         publication is switched on, default value is used for result name.
8849
8850             Returns:
8851                 New GEOM.GEOM_Object, containing the result shape.
8852             """
8853             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8854             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8855             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8856             anObj.SetParameters(Parameters)
8857             self._autoPublish(anObj, theName, "chamfer")
8858             return anObj
8859
8860         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8861         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8862         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8863             """
8864             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8865             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8866             """
8867             flag = False
8868             if isinstance(theAngle,str):
8869                 flag = True
8870             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8871             if flag:
8872                 theAngle = theAngle*math.pi/180.0
8873             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8874             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8875             anObj.SetParameters(Parameters)
8876             self._autoPublish(anObj, theName, "chamfer")
8877             return anObj
8878
8879         ## @sa MakeChamferEdge(), MakeChamferFaces()
8880         #
8881         #  @ref swig_MakeChamfer "Example"
8882         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8883             """
8884             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8885             """
8886             # Example: see GEOM_TestOthers.py
8887             anObj = None
8888             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8889             if aShapeType == self.ShapeType["EDGE"]:
8890                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8891             else:
8892                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8893             return anObj
8894             
8895         ## Remove material from a solid by extrusion of the base shape on the given distance.
8896         #  @param theInit Shape to remove material from. It must be a solid or 
8897         #  a compound made of a single solid.
8898         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8899         #  @param theH Prism dimension along the normal to theBase
8900         #  @param theAngle Draft angle in degrees.
8901         #  @param theName Object name; when specified, this parameter is used
8902         #         for result publication in the study. Otherwise, if automatic
8903         #         publication is switched on, default value is used for result name.
8904         #
8905         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8906         #
8907         #  @ref tui_creation_prism "Example"
8908         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8909             """
8910             Add material to a solid by extrusion of the base shape on the given distance.
8911
8912             Parameters:
8913                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8914                 theBase Closed edge or wire defining the base shape to be extruded.
8915                 theH Prism dimension along the normal  to theBase
8916                 theAngle Draft angle in degrees.
8917                 theName Object name; when specified, this parameter is used
8918                         for result publication in the study. Otherwise, if automatic
8919                         publication is switched on, default value is used for result name.
8920
8921             Returns:
8922                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8923             """
8924             # Example: see GEOM_TestAll.py
8925             #theH,Parameters = ParseParameters(theH)
8926             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8927             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8928             #anObj.SetParameters(Parameters)
8929             self._autoPublish(anObj, theName, "extrudedCut")
8930             return anObj   
8931             
8932         ## Add material to a solid by extrusion of the base shape on the given distance.
8933         #  @param theInit Shape to add material to. It must be a solid or 
8934         #  a compound made of a single solid.
8935         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8936         #  @param theH Prism dimension along the normal to theBase
8937         #  @param theAngle Draft angle in degrees.
8938         #  @param theName Object name; when specified, this parameter is used
8939         #         for result publication in the study. Otherwise, if automatic
8940         #         publication is switched on, default value is used for result name.
8941         #
8942         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
8943         #
8944         #  @ref tui_creation_prism "Example"
8945         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
8946             """
8947             Add material to a solid by extrusion of the base shape on the given distance.
8948
8949             Parameters:
8950                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
8951                 theBase Closed edge or wire defining the base shape to be extruded.
8952                 theH Prism dimension along the normal  to theBase
8953                 theAngle Draft angle in degrees.
8954                 theName Object name; when specified, this parameter is used
8955                         for result publication in the study. Otherwise, if automatic
8956                         publication is switched on, default value is used for result name.
8957
8958             Returns:
8959                 New GEOM.GEOM_Object,  containing the initial shape with added material.
8960             """
8961             # Example: see GEOM_TestAll.py
8962             #theH,Parameters = ParseParameters(theH)
8963             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8964             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8965             #anObj.SetParameters(Parameters)
8966             self._autoPublish(anObj, theName, "extrudedBoss")
8967             return anObj   
8968
8969         # end of l3_local
8970         ## @}
8971
8972         ## @addtogroup l3_basic_op
8973         ## @{
8974
8975         ## Perform an Archimde operation on the given shape with given parameters.
8976         #  The object presenting the resulting face is returned.
8977         #  @param theShape Shape to be put in water.
8978         #  @param theWeight Weight og the shape.
8979         #  @param theWaterDensity Density of the water.
8980         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
8981         #  @param theName Object name; when specified, this parameter is used
8982         #         for result publication in the study. Otherwise, if automatic
8983         #         publication is switched on, default value is used for result name.
8984         #
8985         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
8986         #          by a plane, corresponding to water level.
8987         #
8988         #  @ref tui_archimede "Example"
8989         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
8990             """
8991             Perform an Archimde operation on the given shape with given parameters.
8992             The object presenting the resulting face is returned.
8993
8994             Parameters: 
8995                 theShape Shape to be put in water.
8996                 theWeight Weight og the shape.
8997                 theWaterDensity Density of the water.
8998                 theMeshDeflection Deflection of the mesh, using to compute the section.
8999                 theName Object name; when specified, this parameter is used
9000                         for result publication in the study. Otherwise, if automatic
9001                         publication is switched on, default value is used for result name.
9002
9003             Returns: 
9004                 New GEOM.GEOM_Object, containing a section of theShape
9005                 by a plane, corresponding to water level.
9006             """
9007             # Example: see GEOM_TestAll.py
9008             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9009               theWeight,theWaterDensity,theMeshDeflection)
9010             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9011             RaiseIfFailed("MakeArchimede", self.LocalOp)
9012             anObj.SetParameters(Parameters)
9013             self._autoPublish(anObj, theName, "archimede")
9014             return anObj
9015
9016         # end of l3_basic_op
9017         ## @}
9018
9019         ## @addtogroup l2_measure
9020         ## @{
9021
9022         ## Get point coordinates
9023         #  @return [x, y, z]
9024         #
9025         #  @ref tui_measurement_tools_page "Example"
9026         def PointCoordinates(self,Point):
9027             """
9028             Get point coordinates
9029
9030             Returns:
9031                 [x, y, z]
9032             """
9033             # Example: see GEOM_TestMeasures.py
9034             aTuple = self.MeasuOp.PointCoordinates(Point)
9035             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9036             return aTuple 
9037         
9038         ## Get vector coordinates
9039         #  @return [x, y, z]
9040         #
9041         #  @ref tui_measurement_tools_page "Example"
9042         def VectorCoordinates(self,Vector):
9043             """
9044             Get vector coordinates
9045
9046             Returns:
9047                 [x, y, z]
9048             """
9049
9050             p1=self.GetFirstVertex(Vector)
9051             p2=self.GetLastVertex(Vector)
9052             
9053             X1=self.PointCoordinates(p1)
9054             X2=self.PointCoordinates(p2)
9055
9056             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9057
9058
9059         ## Compute cross product
9060         #  @return vector w=u^v
9061         #
9062         #  @ref tui_measurement_tools_page "Example"
9063         def CrossProduct(self, Vector1, Vector2):
9064             """ 
9065             Compute cross product
9066             
9067             Returns: vector w=u^v
9068             """
9069             u=self.VectorCoordinates(Vector1)
9070             v=self.VectorCoordinates(Vector2)
9071             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])
9072             
9073             return w
9074         
9075         ## Compute cross product
9076         #  @return dot product  p=u.v
9077         #
9078         #  @ref tui_measurement_tools_page "Example"
9079         def DotProduct(self, Vector1, Vector2):
9080             """ 
9081             Compute cross product
9082             
9083             Returns: dot product  p=u.v
9084             """
9085             u=self.VectorCoordinates(Vector1)
9086             v=self.VectorCoordinates(Vector2)
9087             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9088             
9089             return p
9090
9091
9092         ## Get summarized length of all wires,
9093         #  area of surface and volume of the given shape.
9094         #  @param theShape Shape to define properties of.
9095         #  @return [theLength, theSurfArea, theVolume]\n
9096         #  theLength:   Summarized length of all wires of the given shape.\n
9097         #  theSurfArea: Area of surface of the given shape.\n
9098         #  theVolume:   Volume of the given shape.
9099         #
9100         #  @ref tui_measurement_tools_page "Example"
9101         def BasicProperties(self,theShape):
9102             """
9103             Get summarized length of all wires,
9104             area of surface and volume of the given shape.
9105
9106             Parameters: 
9107                 theShape Shape to define properties of.
9108
9109             Returns:
9110                 [theLength, theSurfArea, theVolume]
9111                  theLength:   Summarized length of all wires of the given shape.
9112                  theSurfArea: Area of surface of the given shape.
9113                  theVolume:   Volume of the given shape.
9114             """
9115             # Example: see GEOM_TestMeasures.py
9116             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9117             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9118             return aTuple
9119
9120         ## Get parameters of bounding box of the given shape
9121         #  @param theShape Shape to obtain bounding box of.
9122         #  @param precise TRUE for precise computation; FALSE for fast one.
9123         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9124         #  Xmin,Xmax: Limits of shape along OX axis.
9125         #  Ymin,Ymax: Limits of shape along OY axis.
9126         #  Zmin,Zmax: Limits of shape along OZ axis.
9127         #
9128         #  @ref tui_measurement_tools_page "Example"
9129         def BoundingBox (self, theShape, precise=False):
9130             """
9131             Get parameters of bounding box of the given shape
9132
9133             Parameters: 
9134                 theShape Shape to obtain bounding box of.
9135                 precise TRUE for precise computation; FALSE for fast one.
9136
9137             Returns:
9138                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9139                  Xmin,Xmax: Limits of shape along OX axis.
9140                  Ymin,Ymax: Limits of shape along OY axis.
9141                  Zmin,Zmax: Limits of shape along OZ axis.
9142             """
9143             # Example: see GEOM_TestMeasures.py
9144             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9145             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9146             return aTuple
9147
9148         ## Get bounding box of the given shape
9149         #  @param theShape Shape to obtain bounding box of.
9150         #  @param precise TRUE for precise computation; FALSE for fast one.
9151         #  @param theName Object name; when specified, this parameter is used
9152         #         for result publication in the study. Otherwise, if automatic
9153         #         publication is switched on, default value is used for result name.
9154         #
9155         #  @return New GEOM.GEOM_Object, containing the created box.
9156         #
9157         #  @ref tui_measurement_tools_page "Example"
9158         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9159             """
9160             Get bounding box of the given shape
9161
9162             Parameters: 
9163                 theShape Shape to obtain bounding box of.
9164                 precise TRUE for precise computation; FALSE for fast one.
9165                 theName Object name; when specified, this parameter is used
9166                         for result publication in the study. Otherwise, if automatic
9167                         publication is switched on, default value is used for result name.
9168
9169             Returns:
9170                 New GEOM.GEOM_Object, containing the created box.
9171             """
9172             # Example: see GEOM_TestMeasures.py
9173             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9174             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9175             self._autoPublish(anObj, theName, "bndbox")
9176             return anObj
9177
9178         ## Get inertia matrix and moments of inertia of theShape.
9179         #  @param theShape Shape to calculate inertia of.
9180         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9181         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9182         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9183         #
9184         #  @ref tui_measurement_tools_page "Example"
9185         def Inertia(self,theShape):
9186             """
9187             Get inertia matrix and moments of inertia of theShape.
9188
9189             Parameters: 
9190                 theShape Shape to calculate inertia of.
9191
9192             Returns:
9193                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9194                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9195                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9196             """
9197             # Example: see GEOM_TestMeasures.py
9198             aTuple = self.MeasuOp.GetInertia(theShape)
9199             RaiseIfFailed("GetInertia", self.MeasuOp)
9200             return aTuple
9201
9202         ## Get if coords are included in the shape (ST_IN or ST_ON)
9203         #  @param theShape Shape
9204         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9205         #  @param tolerance to be used (default is 1.0e-7)
9206         #  @return list_of_boolean = [res1, res2, ...]
9207         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9208             """
9209             Get if coords are included in the shape (ST_IN or ST_ON)
9210             
9211             Parameters: 
9212                 theShape Shape
9213                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9214                 tolerance to be used (default is 1.0e-7)
9215
9216             Returns:
9217                 list_of_boolean = [res1, res2, ...]
9218             """
9219             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9220
9221         ## Get minimal distance between the given shapes.
9222         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9223         #  @return Value of the minimal distance between the given shapes.
9224         #
9225         #  @ref tui_measurement_tools_page "Example"
9226         def MinDistance(self, theShape1, theShape2):
9227             """
9228             Get minimal distance between the given shapes.
9229             
9230             Parameters: 
9231                 theShape1,theShape2 Shapes to find minimal distance between.
9232
9233             Returns:    
9234                 Value of the minimal distance between the given shapes.
9235             """
9236             # Example: see GEOM_TestMeasures.py
9237             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9238             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9239             return aTuple[0]
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, in form of list
9244         #          [Distance, DX, DY, DZ].
9245         #
9246         #  @ref swig_all_measure "Example"
9247         def MinDistanceComponents(self, theShape1, theShape2):
9248             """
9249             Get minimal distance between the given shapes.
9250
9251             Parameters: 
9252                 theShape1,theShape2 Shapes to find minimal distance between.
9253
9254             Returns:  
9255                 Value of the minimal distance between the given shapes, in form of list
9256                 [Distance, DX, DY, DZ]
9257             """
9258             # Example: see GEOM_TestMeasures.py
9259             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9260             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9261             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9262             return aRes
9263
9264         ## Get closest points of the given shapes.
9265         #  @param theShape1,theShape2 Shapes to find closest points of.
9266         #  @return The number of found solutions (-1 in case of infinite number of
9267         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9268         #
9269         #  @ref tui_measurement_tools_page "Example"
9270         def ClosestPoints (self, theShape1, theShape2):
9271             """
9272             Get closest points of the given shapes.
9273
9274             Parameters: 
9275                 theShape1,theShape2 Shapes to find closest points of.
9276
9277             Returns:    
9278                 The number of found solutions (-1 in case of infinite number of
9279                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9280             """
9281             # Example: see GEOM_TestMeasures.py
9282             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9283             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9284             return aTuple
9285
9286         ## Get angle between the given shapes in degrees.
9287         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9288         #  @note If both arguments are vectors, the angle is computed in accordance
9289         #        with their orientations, otherwise the minimum angle is computed.
9290         #  @return Value of the angle between the given shapes in degrees.
9291         #
9292         #  @ref tui_measurement_tools_page "Example"
9293         def GetAngle(self, theShape1, theShape2):
9294             """
9295             Get angle between the given shapes in degrees.
9296
9297             Parameters: 
9298                 theShape1,theShape2 Lines or linear edges to find angle between.
9299
9300             Note:
9301                 If both arguments are vectors, the angle is computed in accordance
9302                 with their orientations, otherwise the minimum angle is computed.
9303
9304             Returns:  
9305                 Value of the angle between the given shapes in degrees.
9306             """
9307             # Example: see GEOM_TestMeasures.py
9308             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9309             RaiseIfFailed("GetAngle", self.MeasuOp)
9310             return anAngle
9311
9312         ## Get angle between the given shapes in radians.
9313         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9314         #  @note If both arguments are vectors, the angle is computed in accordance
9315         #        with their orientations, otherwise the minimum angle is computed.
9316         #  @return Value of the angle between the given shapes in radians.
9317         #
9318         #  @ref tui_measurement_tools_page "Example"
9319         def GetAngleRadians(self, theShape1, theShape2):
9320             """
9321             Get angle between the given shapes in radians.
9322
9323             Parameters: 
9324                 theShape1,theShape2 Lines or linear edges to find angle between.
9325
9326                 
9327             Note:
9328                 If both arguments are vectors, the angle is computed in accordance
9329                 with their orientations, otherwise the minimum angle is computed.
9330
9331             Returns:  
9332                 Value of the angle between the given shapes in radians.
9333             """
9334             # Example: see GEOM_TestMeasures.py
9335             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9336             RaiseIfFailed("GetAngle", self.MeasuOp)
9337             return anAngle
9338
9339         ## Get angle between the given vectors in degrees.
9340         #  @param theShape1,theShape2 Vectors to find angle between.
9341         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9342         #                 if False, the opposite vector to the normal vector is used.
9343         #  @return Value of the angle between the given vectors in degrees.
9344         #
9345         #  @ref tui_measurement_tools_page "Example"
9346         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9347             """
9348             Get angle between the given vectors in degrees.
9349
9350             Parameters: 
9351                 theShape1,theShape2 Vectors to find angle between.
9352                 theFlag If True, the normal vector is defined by the two vectors cross,
9353                         if False, the opposite vector to the normal vector is used.
9354
9355             Returns:  
9356                 Value of the angle between the given vectors in degrees.
9357             """
9358             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9359             if not theFlag:
9360                 anAngle = 360. - anAngle
9361             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9362             return anAngle
9363
9364         ## The same as GetAngleVectors, but the result is in radians.
9365         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9366             """
9367             Get angle between the given vectors in radians.
9368
9369             Parameters: 
9370                 theShape1,theShape2 Vectors to find angle between.
9371                 theFlag If True, the normal vector is defined by the two vectors cross,
9372                         if False, the opposite vector to the normal vector is used.
9373
9374             Returns:  
9375                 Value of the angle between the given vectors in radians.
9376             """
9377             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9378             return anAngle
9379
9380         ## @name Curve Curvature Measurement
9381         #  Methods for receiving radius of curvature of curves
9382         #  in the given point
9383         ## @{
9384
9385         ## Measure curvature of a curve at a point, set by parameter.
9386         #  @param theCurve a curve.
9387         #  @param theParam parameter.
9388         #  @return radius of curvature of \a theCurve.
9389         #
9390         #  @ref swig_todo "Example"
9391         def CurveCurvatureByParam(self, theCurve, theParam):
9392             """
9393             Measure curvature of a curve at a point, set by parameter.
9394
9395             Parameters: 
9396                 theCurve a curve.
9397                 theParam parameter.
9398
9399             Returns: 
9400                 radius of curvature of theCurve.
9401             """
9402             # Example: see GEOM_TestMeasures.py
9403             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9404             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9405             return aCurv
9406
9407         ## Measure curvature of a curve at a point.
9408         #  @param theCurve a curve.
9409         #  @param thePoint given point.
9410         #  @return radius of curvature of \a theCurve.
9411         #
9412         #  @ref swig_todo "Example"
9413         def CurveCurvatureByPoint(self, theCurve, thePoint):
9414             """
9415             Measure curvature of a curve at a point.
9416
9417             Parameters: 
9418                 theCurve a curve.
9419                 thePoint given point.
9420
9421             Returns: 
9422                 radius of curvature of theCurve.           
9423             """
9424             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9425             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9426             return aCurv
9427         ## @}
9428
9429         ## @name Surface Curvature Measurement
9430         #  Methods for receiving max and min radius of curvature of surfaces
9431         #  in the given point
9432         ## @{
9433
9434         ## Measure max radius of curvature of surface.
9435         #  @param theSurf the given surface.
9436         #  @param theUParam Value of U-parameter on the referenced surface.
9437         #  @param theVParam Value of V-parameter on the referenced surface.
9438         #  @return max radius of curvature of theSurf.
9439         #
9440         ## @ref swig_todo "Example"
9441         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9442             """
9443             Measure max radius of curvature of surface.
9444
9445             Parameters: 
9446                 theSurf the given surface.
9447                 theUParam Value of U-parameter on the referenced surface.
9448                 theVParam Value of V-parameter on the referenced surface.
9449                 
9450             Returns:     
9451                 max radius of curvature of theSurf.
9452             """
9453             # Example: see GEOM_TestMeasures.py
9454             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9455             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9456             return aSurf
9457
9458         ## Measure max radius of curvature of surface in the given point
9459         #  @param theSurf the given surface.
9460         #  @param thePoint given point.
9461         #  @return max radius of curvature of theSurf.
9462         #
9463         ## @ref swig_todo "Example"
9464         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9465             """
9466             Measure max radius of curvature of surface in the given point.
9467
9468             Parameters: 
9469                 theSurf the given surface.
9470                 thePoint given point.
9471                 
9472             Returns:     
9473                 max radius of curvature of theSurf.          
9474             """
9475             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9476             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9477             return aSurf
9478
9479         ## Measure min radius of curvature of surface.
9480         #  @param theSurf the given surface.
9481         #  @param theUParam Value of U-parameter on the referenced surface.
9482         #  @param theVParam Value of V-parameter on the referenced surface.
9483         #  @return min radius of curvature of theSurf.
9484         #   
9485         ## @ref swig_todo "Example"
9486         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9487             """
9488             Measure min radius of curvature of surface.
9489
9490             Parameters: 
9491                 theSurf the given surface.
9492                 theUParam Value of U-parameter on the referenced surface.
9493                 theVParam Value of V-parameter on the referenced surface.
9494                 
9495             Returns:     
9496                 Min radius of curvature of theSurf.
9497             """
9498             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9499             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9500             return aSurf
9501
9502         ## Measure min radius of curvature of surface in the given point
9503         #  @param theSurf the given surface.
9504         #  @param thePoint given point.
9505         #  @return min radius of curvature of theSurf.
9506         #
9507         ## @ref swig_todo "Example"
9508         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9509             """
9510             Measure min radius of curvature of surface in the given point.
9511
9512             Parameters: 
9513                 theSurf the given surface.
9514                 thePoint given point.
9515                 
9516             Returns:     
9517                 Min radius of curvature of theSurf.          
9518             """
9519             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9520             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9521             return aSurf
9522         ## @}
9523
9524         ## Get min and max tolerances of sub-shapes of theShape
9525         #  @param theShape Shape, to get tolerances of.
9526         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9527         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9528         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9529         #  VertMin,VertMax: Min and max tolerances of the vertices.
9530         #
9531         #  @ref tui_measurement_tools_page "Example"
9532         def Tolerance(self,theShape):
9533             """
9534             Get min and max tolerances of sub-shapes of theShape
9535
9536             Parameters: 
9537                 theShape Shape, to get tolerances of.
9538
9539             Returns:    
9540                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9541                  FaceMin,FaceMax: Min and max tolerances of the faces.
9542                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9543                  VertMin,VertMax: Min and max tolerances of the vertices.
9544             """
9545             # Example: see GEOM_TestMeasures.py
9546             aTuple = self.MeasuOp.GetTolerance(theShape)
9547             RaiseIfFailed("GetTolerance", self.MeasuOp)
9548             return aTuple
9549
9550         ## Obtain description of the given shape (number of sub-shapes of each type)
9551         #  @param theShape Shape to be described.
9552         #  @return Description of the given shape.
9553         #
9554         #  @ref tui_measurement_tools_page "Example"
9555         def WhatIs(self,theShape):
9556             """
9557             Obtain description of the given shape (number of sub-shapes of each type)
9558
9559             Parameters:
9560                 theShape Shape to be described.
9561
9562             Returns:
9563                 Description of the given shape.
9564             """
9565             # Example: see GEOM_TestMeasures.py
9566             aDescr = self.MeasuOp.WhatIs(theShape)
9567             RaiseIfFailed("WhatIs", self.MeasuOp)
9568             return aDescr
9569
9570         ## Obtain quantity of shapes of the given type in \a theShape.
9571         #  If \a theShape is of type \a theType, it is also counted.
9572         #  @param theShape Shape to be described.
9573         #  @param theType the given ShapeType().
9574         #  @return Quantity of shapes of type \a theType in \a theShape.
9575         #
9576         #  @ref tui_measurement_tools_page "Example"
9577         def NbShapes (self, theShape, theType):
9578             """
9579             Obtain quantity of shapes of the given type in theShape.
9580             If theShape is of type theType, it is also counted.
9581
9582             Parameters:
9583                 theShape Shape to be described.
9584                 theType the given geompy.ShapeType
9585
9586             Returns:
9587                 Quantity of shapes of type theType in theShape.
9588             """
9589             # Example: see GEOM_TestMeasures.py
9590             listSh = self.SubShapeAllIDs(theShape, theType)
9591             Nb = len(listSh)
9592             t       = EnumToLong(theShape.GetShapeType())
9593             theType = EnumToLong(theType)
9594             if t == theType:
9595                 Nb = Nb + 1
9596                 pass
9597             return Nb
9598
9599         ## Obtain quantity of shapes of each type in \a theShape.
9600         #  The \a theShape is also counted.
9601         #  @param theShape Shape to be described.
9602         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9603         #
9604         #  @ref tui_measurement_tools_page "Example"
9605         def ShapeInfo (self, theShape):
9606             """
9607             Obtain quantity of shapes of each type in theShape.
9608             The theShape is also counted.
9609
9610             Parameters:
9611                 theShape Shape to be described.
9612
9613             Returns:
9614                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9615             """
9616             # Example: see GEOM_TestMeasures.py
9617             aDict = {}
9618             for typeSh in self.ShapeType:
9619                 if typeSh in ( "AUTO", "SHAPE" ): continue
9620                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9621                 Nb = len(listSh)
9622                 if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
9623                     Nb = Nb + 1
9624                     pass
9625                 aDict[typeSh] = Nb
9626                 pass
9627             return aDict
9628
9629         def GetCreationInformation(self, theShape):
9630             info = theShape.GetCreationInformation()
9631             # operationName
9632             opName = info.operationName
9633             if not opName: opName = "no info available"
9634             res = "Operation: " + opName
9635             # parameters
9636             for parVal in info.params:
9637                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9638             return res
9639
9640         ## Get a point, situated at the centre of mass of theShape.
9641         #  @param theShape Shape to define centre of mass of.
9642         #  @param theName Object name; when specified, this parameter is used
9643         #         for result publication in the study. Otherwise, if automatic
9644         #         publication is switched on, default value is used for result name.
9645         #
9646         #  @return New GEOM.GEOM_Object, containing the created point.
9647         #
9648         #  @ref tui_measurement_tools_page "Example"
9649         def MakeCDG(self, theShape, theName=None):
9650             """
9651             Get a point, situated at the centre of mass of theShape.
9652
9653             Parameters:
9654                 theShape Shape to define centre of mass of.
9655                 theName Object name; when specified, this parameter is used
9656                         for result publication in the study. Otherwise, if automatic
9657                         publication is switched on, default value is used for result name.
9658
9659             Returns:
9660                 New GEOM.GEOM_Object, containing the created point.
9661             """
9662             # Example: see GEOM_TestMeasures.py
9663             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9664             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9665             self._autoPublish(anObj, theName, "centerOfMass")
9666             return anObj
9667
9668         ## Get a vertex sub-shape by index depended with orientation.
9669         #  @param theShape Shape to find sub-shape.
9670         #  @param theIndex Index to find vertex by this index (starting from zero)
9671         #  @param theName Object name; when specified, this parameter is used
9672         #         for result publication in the study. Otherwise, if automatic
9673         #         publication is switched on, default value is used for result name.
9674         #
9675         #  @return New GEOM.GEOM_Object, containing the created vertex.
9676         #
9677         #  @ref tui_measurement_tools_page "Example"
9678         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9679             """
9680             Get a vertex sub-shape by index depended with orientation.
9681
9682             Parameters:
9683                 theShape Shape to find sub-shape.
9684                 theIndex Index to find vertex by this index (starting from zero)
9685                 theName Object name; when specified, this parameter is used
9686                         for result publication in the study. Otherwise, if automatic
9687                         publication is switched on, default value is used for result name.
9688
9689             Returns:
9690                 New GEOM.GEOM_Object, containing the created vertex.
9691             """
9692             # Example: see GEOM_TestMeasures.py
9693             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9694             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9695             self._autoPublish(anObj, theName, "vertex")
9696             return anObj
9697
9698         ## Get the first vertex of wire/edge depended orientation.
9699         #  @param theShape Shape to find first vertex.
9700         #  @param theName Object name; when specified, this parameter is used
9701         #         for result publication in the study. Otherwise, if automatic
9702         #         publication is switched on, default value is used for result name.
9703         #
9704         #  @return New GEOM.GEOM_Object, containing the created vertex.
9705         #
9706         #  @ref tui_measurement_tools_page "Example"
9707         def GetFirstVertex(self, theShape, theName=None):
9708             """
9709             Get the first vertex of wire/edge depended orientation.
9710
9711             Parameters:
9712                 theShape Shape to find first vertex.
9713                 theName Object name; when specified, this parameter is used
9714                         for result publication in the study. Otherwise, if automatic
9715                         publication is switched on, default value is used for result name.
9716
9717             Returns:    
9718                 New GEOM.GEOM_Object, containing the created vertex.
9719             """
9720             # Example: see GEOM_TestMeasures.py
9721             # note: auto-publishing is done in self.GetVertexByIndex()
9722             anObj = self.GetVertexByIndex(theShape, 0, theName)
9723             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9724             return anObj
9725
9726         ## Get the last vertex of wire/edge depended orientation.
9727         #  @param theShape Shape to find last vertex.
9728         #  @param theName Object name; when specified, this parameter is used
9729         #         for result publication in the study. Otherwise, if automatic
9730         #         publication is switched on, default value is used for result name.
9731         #
9732         #  @return New GEOM.GEOM_Object, containing the created vertex.
9733         #
9734         #  @ref tui_measurement_tools_page "Example"
9735         def GetLastVertex(self, theShape, theName=None):
9736             """
9737             Get the last vertex of wire/edge depended orientation.
9738
9739             Parameters: 
9740                 theShape Shape to find last vertex.
9741                 theName Object name; when specified, this parameter is used
9742                         for result publication in the study. Otherwise, if automatic
9743                         publication is switched on, default value is used for result name.
9744
9745             Returns:   
9746                 New GEOM.GEOM_Object, containing the created vertex.
9747             """
9748             # Example: see GEOM_TestMeasures.py
9749             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9750             # note: auto-publishing is done in self.GetVertexByIndex()
9751             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9752             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9753             return anObj
9754
9755         ## Get a normale to the given face. If the point is not given,
9756         #  the normale is calculated at the center of mass.
9757         #  @param theFace Face to define normale of.
9758         #  @param theOptionalPoint Point to compute the normale at.
9759         #  @param theName Object name; when specified, this parameter is used
9760         #         for result publication in the study. Otherwise, if automatic
9761         #         publication is switched on, default value is used for result name.
9762         #
9763         #  @return New GEOM.GEOM_Object, containing the created vector.
9764         #
9765         #  @ref swig_todo "Example"
9766         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9767             """
9768             Get a normale to the given face. If the point is not given,
9769             the normale is calculated at the center of mass.
9770             
9771             Parameters: 
9772                 theFace Face to define normale of.
9773                 theOptionalPoint Point to compute the normale at.
9774                 theName Object name; when specified, this parameter is used
9775                         for result publication in the study. Otherwise, if automatic
9776                         publication is switched on, default value is used for result name.
9777
9778             Returns:   
9779                 New GEOM.GEOM_Object, containing the created vector.
9780             """
9781             # Example: see GEOM_TestMeasures.py
9782             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9783             RaiseIfFailed("GetNormal", self.MeasuOp)
9784             self._autoPublish(anObj, theName, "normal")
9785             return anObj
9786
9787         ## Check a topology of the given shape.
9788         #  @param theShape Shape to check validity of.
9789         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9790         #                        if TRUE, the shape's geometry will be checked also.
9791         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9792         #                        of problem is printed.
9793         #                        if TRUE and if theShape is invalid, the description 
9794         #                        of problem is also returned.
9795         #  @return TRUE, if the shape "seems to be valid".
9796         #
9797         #  @ref tui_measurement_tools_page "Example"
9798         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9799             """
9800             Check a topology of the given shape.
9801
9802             Parameters: 
9803                 theShape Shape to check validity of.
9804                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9805                                if TRUE, the shape's geometry will be checked also.
9806                 theReturnStatus If FALSE and if theShape is invalid, a description
9807                                 of problem is printed.
9808                                 if TRUE and if theShape is invalid, the description 
9809                                 of problem is returned.
9810
9811             Returns:   
9812                 TRUE, if the shape "seems to be valid".
9813                 If theShape is invalid, prints a description of problem.
9814                 This description can also be returned.
9815             """
9816             # Example: see GEOM_TestMeasures.py
9817             if theIsCheckGeom:
9818                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9819                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9820             else:
9821                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9822                 RaiseIfFailed("CheckShape", self.MeasuOp)
9823             if IsValid == 0:
9824                 if theReturnStatus == 0:
9825                     print Status
9826             if theReturnStatus == 1:
9827               return (IsValid, Status)
9828             return IsValid
9829
9830         ## Detect self-intersections in the given shape.
9831         #  @param theShape Shape to check.
9832         #  @return TRUE, if the shape contains no self-intersections.
9833         #
9834         #  @ref tui_measurement_tools_page "Example"
9835         def CheckSelfIntersections(self, theShape):
9836             """
9837             Detect self-intersections in the given shape.
9838
9839             Parameters: 
9840                 theShape Shape to check.
9841
9842             Returns:   
9843                 TRUE, if the shape contains no self-intersections.
9844             """
9845             # Example: see GEOM_TestMeasures.py
9846             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9847             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9848             return IsValid
9849
9850         ## Get position (LCS) of theShape.
9851         #
9852         #  Origin of the LCS is situated at the shape's center of mass.
9853         #  Axes of the LCS are obtained from shape's location or,
9854         #  if the shape is a planar face, from position of its plane.
9855         #
9856         #  @param theShape Shape to calculate position of.
9857         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9858         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9859         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9860         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9861         #
9862         #  @ref swig_todo "Example"
9863         def GetPosition(self,theShape):
9864             """
9865             Get position (LCS) of theShape.
9866             Origin of the LCS is situated at the shape's center of mass.
9867             Axes of the LCS are obtained from shape's location or,
9868             if the shape is a planar face, from position of its plane.
9869
9870             Parameters: 
9871                 theShape Shape to calculate position of.
9872
9873             Returns:  
9874                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9875                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9876                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9877                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9878             """
9879             # Example: see GEOM_TestMeasures.py
9880             aTuple = self.MeasuOp.GetPosition(theShape)
9881             RaiseIfFailed("GetPosition", self.MeasuOp)
9882             return aTuple
9883
9884         ## Get kind of theShape.
9885         #
9886         #  @param theShape Shape to get a kind of.
9887         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9888         #          and a list of parameters, describing the shape.
9889         #  @note  Concrete meaning of each value, returned via \a theIntegers
9890         #         or \a theDoubles list depends on the kind() of the shape.
9891         #
9892         #  @ref swig_todo "Example"
9893         def KindOfShape(self,theShape):
9894             """
9895             Get kind of theShape.
9896          
9897             Parameters: 
9898                 theShape Shape to get a kind of.
9899
9900             Returns:
9901                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9902                     and a list of parameters, describing the shape.
9903             Note:
9904                 Concrete meaning of each value, returned via theIntegers
9905                 or theDoubles list depends on the geompy.kind of the shape
9906             """
9907             # Example: see GEOM_TestMeasures.py
9908             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9909             RaiseIfFailed("KindOfShape", self.MeasuOp)
9910
9911             aKind  = aRoughTuple[0]
9912             anInts = aRoughTuple[1]
9913             aDbls  = aRoughTuple[2]
9914
9915             # Now there is no exception from this rule:
9916             aKindTuple = [aKind] + aDbls + anInts
9917
9918             # If they are we will regroup parameters for such kind of shape.
9919             # For example:
9920             #if aKind == kind.SOME_KIND:
9921             #    #  SOME_KIND     int int double int double double
9922             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9923
9924             return aKindTuple
9925
9926         # end of l2_measure
9927         ## @}
9928
9929         ## @addtogroup l2_import_export
9930         ## @{
9931
9932         ## Import a shape from the BREP or IGES or STEP file
9933         #  (depends on given format) with given name.
9934         #  @param theFileName The file, containing the shape.
9935         #  @param theFormatName Specify format for the file reading.
9936         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9937         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9938         #            format 'STEP_SCALE' is used instead of 'STEP',
9939         #            length unit will be set to 'meter' and result model will be scaled.
9940         #  @param theName Object name; when specified, this parameter is used
9941         #         for result publication in the study. Otherwise, if automatic
9942         #         publication is switched on, default value is used for result name.
9943         #
9944         #  @return New GEOM.GEOM_Object, containing the imported shape.
9945         #
9946         #  @ref swig_Import_Export "Example"
9947         def ImportFile(self, theFileName, theFormatName, theName=None):
9948             """
9949             Import a shape from the BREP or IGES or STEP file
9950             (depends on given format) with given name.
9951
9952             Parameters: 
9953                 theFileName The file, containing the shape.
9954                 theFormatName Specify format for the file reading.
9955                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9956                     If format 'IGES_SCALE' is used instead of 'IGES' or
9957                        format 'STEP_SCALE' is used instead of 'STEP',
9958                        length unit will be set to 'meter' and result model will be scaled.
9959                 theName Object name; when specified, this parameter is used
9960                         for result publication in the study. Otherwise, if automatic
9961                         publication is switched on, default value is used for result name.
9962
9963             Returns:
9964                 New GEOM.GEOM_Object, containing the imported shape.
9965             """
9966             # Example: see GEOM_TestOthers.py
9967             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9968             RaiseIfFailed("ImportFile", self.InsertOp)
9969             self._autoPublish(anObj, theName, "imported")
9970             return anObj
9971
9972         ## Deprecated analog of ImportFile()
9973         def Import(self, theFileName, theFormatName, theName=None):
9974             """
9975             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9976             """
9977             print "WARNING: Function Import is deprecated, use ImportFile instead"
9978             # note: auto-publishing is done in self.ImportFile()
9979             return self.ImportFile(theFileName, theFormatName, theName)
9980
9981         ## Shortcut to ImportFile() for BREP format.
9982         #  Import a shape from the BREP file with given name.
9983         #  @param theFileName The file, containing the shape.
9984         #  @param theName Object name; when specified, this parameter is used
9985         #         for result publication in the study. Otherwise, if automatic
9986         #         publication is switched on, default value is used for result name.
9987         #
9988         #  @return New GEOM.GEOM_Object, containing the imported shape.
9989         #
9990         #  @ref swig_Import_Export "Example"
9991         def ImportBREP(self, theFileName, theName=None):
9992             """
9993             geompy.ImportFile(...) function for BREP format
9994             Import a shape from the BREP file with given name.
9995
9996             Parameters: 
9997                 theFileName The file, containing the shape.
9998                 theName Object name; when specified, this parameter is used
9999                         for result publication in the study. Otherwise, if automatic
10000                         publication is switched on, default value is used for result name.
10001
10002             Returns:
10003                 New GEOM.GEOM_Object, containing the imported shape.
10004             """
10005             # Example: see GEOM_TestOthers.py
10006             # note: auto-publishing is done in self.ImportFile()
10007             return self.ImportFile(theFileName, "BREP", theName)
10008
10009         ## Shortcut to ImportFile() for IGES format
10010         #  Import a shape from the IGES file with given name.
10011         #  @param theFileName The file, containing the shape.
10012         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10013         #                     and result model will be scaled, if its units are not meters.
10014         #                     If False (default), file length units will be taken into account.
10015         #  @param theName Object name; when specified, this parameter is used
10016         #         for result publication in the study. Otherwise, if automatic
10017         #         publication is switched on, default value is used for result name.
10018         #
10019         #  @return New GEOM.GEOM_Object, containing the imported shape.
10020         #
10021         #  @ref swig_Import_Export "Example"
10022         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10023             """
10024             geompy.ImportFile(...) function for IGES format
10025
10026             Parameters:
10027                 theFileName The file, containing the shape.
10028                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10029                             and result model will be scaled, if its units are not meters.
10030                             If False (default), file length units will be taken into account.
10031                 theName Object name; when specified, this parameter is used
10032                         for result publication in the study. Otherwise, if automatic
10033                         publication is switched on, default value is used for result name.
10034
10035             Returns:
10036                 New GEOM.GEOM_Object, containing the imported shape.
10037             """
10038             # Example: see GEOM_TestOthers.py
10039             # note: auto-publishing is done in self.ImportFile()
10040             if ignoreUnits:
10041                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10042             return self.ImportFile(theFileName, "IGES", theName)
10043
10044         ## Return length unit from given IGES file
10045         #  @param theFileName The file, containing the shape.
10046         #  @return String, containing the units name.
10047         #
10048         #  @ref swig_Import_Export "Example"
10049         def GetIGESUnit(self, theFileName):
10050             """
10051             Return length units from given IGES file
10052
10053             Parameters:
10054                 theFileName The file, containing the shape.
10055
10056             Returns:
10057                 String, containing the units name.
10058             """
10059             # Example: see GEOM_TestOthers.py
10060             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10061             return aUnitName
10062
10063         ## Shortcut to ImportFile() for STEP format
10064         #  Import a shape from the STEP file with given name.
10065         #  @param theFileName The file, containing the shape.
10066         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10067         #                     and result model will be scaled, if its units are not meters.
10068         #                     If False (default), file length units will be taken into account.
10069         #  @param theName Object name; when specified, this parameter is used
10070         #         for result publication in the study. Otherwise, if automatic
10071         #         publication is switched on, default value is used for result name.
10072         #
10073         #  @return New GEOM.GEOM_Object, containing the imported shape.
10074         #
10075         #  @ref swig_Import_Export "Example"
10076         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10077             """
10078             geompy.ImportFile(...) function for STEP format
10079
10080             Parameters:
10081                 theFileName The file, containing the shape.
10082                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10083                             and result model will be scaled, if its units are not meters.
10084                             If False (default), file length units will be taken into account.
10085                 theName Object name; when specified, this parameter is used
10086                         for result publication in the study. Otherwise, if automatic
10087                         publication is switched on, default value is used for result name.
10088
10089             Returns:
10090                 New GEOM.GEOM_Object, containing the imported shape.
10091             """
10092             # Example: see GEOM_TestOthers.py
10093             # note: auto-publishing is done in self.ImportFile()
10094             if ignoreUnits:
10095                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10096             return self.ImportFile(theFileName, "STEP", theName)
10097
10098         ## Return length unit from given IGES or STEP file
10099         #  @param theFileName The file, containing the shape.
10100         #  @return String, containing the units name.
10101         #
10102         #  @ref swig_Import_Export "Example"
10103         def GetSTEPUnit(self, theFileName):
10104             """
10105             Return length units from given STEP file
10106
10107             Parameters:
10108                 theFileName The file, containing the shape.
10109
10110             Returns:
10111                 String, containing the units name.
10112             """
10113             # Example: see GEOM_TestOthers.py
10114             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10115             return aUnitName
10116
10117         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10118         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10119         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10120         #  @param theStream The BRep binary stream.
10121         #  @param theName Object name; when specified, this parameter is used
10122         #         for result publication in the study. Otherwise, if automatic
10123         #         publication is switched on, default value is used for result name.
10124         #
10125         #  @return New GEOM_Object, containing the shape, read from theStream.
10126         #
10127         #  @ref swig_Import_Export "Example"
10128         def RestoreShape (self, theStream, theName=None):
10129             """
10130             Read a shape from the binary stream, containing its bounding representation (BRep).
10131
10132             Note:
10133                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10134
10135             Parameters: 
10136                 theStream The BRep binary stream.
10137                 theName Object name; when specified, this parameter is used
10138                         for result publication in the study. Otherwise, if automatic
10139                         publication is switched on, default value is used for result name.
10140
10141             Returns:
10142                 New GEOM_Object, containing the shape, read from theStream.
10143             """
10144             # Example: see GEOM_TestOthers.py
10145             anObj = self.InsertOp.RestoreShape(theStream)
10146             RaiseIfFailed("RestoreShape", self.InsertOp)
10147             self._autoPublish(anObj, theName, "restored")
10148             return anObj
10149
10150         ## Export the given shape into a file with given name.
10151         #  @param theObject Shape to be stored in the file.
10152         #  @param theFileName Name of the file to store the given shape in.
10153         #  @param theFormatName Specify format for the shape storage.
10154         #         Available formats can be obtained with
10155         #         geompy.InsertOp.ExportTranslators()[0] method.
10156         #
10157         #  @ref swig_Import_Export "Example"
10158         def Export(self, theObject, theFileName, theFormatName):
10159             """
10160             Export the given shape into a file with given name.
10161
10162             Parameters: 
10163                 theObject Shape to be stored in the file.
10164                 theFileName Name of the file to store the given shape in.
10165                 theFormatName Specify format for the shape storage.
10166                               Available formats can be obtained with
10167                               geompy.InsertOp.ExportTranslators()[0] method.
10168             """
10169             # Example: see GEOM_TestOthers.py
10170             self.InsertOp.Export(theObject, theFileName, theFormatName)
10171             if self.InsertOp.IsDone() == 0:
10172                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10173                 pass
10174             pass
10175
10176         ## Shortcut to Export() for BREP format
10177         #
10178         #  @ref swig_Import_Export "Example"
10179         def ExportBREP(self,theObject, theFileName):
10180             """
10181             geompy.Export(...) function for BREP format
10182             """
10183             # Example: see GEOM_TestOthers.py
10184             return self.Export(theObject, theFileName, "BREP")
10185
10186         ## Shortcut to Export() for IGES format
10187         #
10188         #  @ref swig_Import_Export "Example"
10189         def ExportIGES(self,theObject, theFileName):
10190             """
10191             geompy.Export(...) function for IGES format
10192             """
10193             # Example: see GEOM_TestOthers.py
10194             return self.Export(theObject, theFileName, "IGES")
10195
10196         ## Shortcut to Export() for STEP format
10197         #
10198         #  @ref swig_Import_Export "Example"
10199         def ExportSTEP(self,theObject, theFileName):
10200             """
10201             geompy.Export(...) function for STEP format
10202             """
10203             # Example: see GEOM_TestOthers.py
10204             return self.Export(theObject, theFileName, "STEP")
10205
10206         # end of l2_import_export
10207         ## @}
10208
10209         ## @addtogroup l3_blocks
10210         ## @{
10211
10212         ## Create a quadrangle face from four edges. Order of Edges is not
10213         #  important. It is  not necessary that edges share the same vertex.
10214         #  @param E1,E2,E3,E4 Edges for the face bound.
10215         #  @param theName Object name; when specified, this parameter is used
10216         #         for result publication in the study. Otherwise, if automatic
10217         #         publication is switched on, default value is used for result name.
10218         #
10219         #  @return New GEOM.GEOM_Object, containing the created face.
10220         #
10221         #  @ref tui_building_by_blocks_page "Example"
10222         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10223             """
10224             Create a quadrangle face from four edges. Order of Edges is not
10225             important. It is  not necessary that edges share the same vertex.
10226
10227             Parameters: 
10228                 E1,E2,E3,E4 Edges for the face bound.
10229                 theName Object name; when specified, this parameter is used
10230                         for result publication in the study. Otherwise, if automatic
10231                         publication is switched on, default value is used for result name.
10232
10233             Returns: 
10234                 New GEOM.GEOM_Object, containing the created face.
10235
10236             Example of usage:               
10237                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10238             """
10239             # Example: see GEOM_Spanner.py
10240             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10241             RaiseIfFailed("MakeQuad", self.BlocksOp)
10242             self._autoPublish(anObj, theName, "quad")
10243             return anObj
10244
10245         ## Create a quadrangle face on two edges.
10246         #  The missing edges will be built by creating the shortest ones.
10247         #  @param E1,E2 Two opposite edges for the face.
10248         #  @param theName Object name; when specified, this parameter is used
10249         #         for result publication in the study. Otherwise, if automatic
10250         #         publication is switched on, default value is used for result name.
10251         #
10252         #  @return New GEOM.GEOM_Object, containing the created face.
10253         #
10254         #  @ref tui_building_by_blocks_page "Example"
10255         def MakeQuad2Edges(self, E1, E2, theName=None):
10256             """
10257             Create a quadrangle face on two edges.
10258             The missing edges will be built by creating the shortest ones.
10259
10260             Parameters: 
10261                 E1,E2 Two opposite edges for the face.
10262                 theName Object name; when specified, this parameter is used
10263                         for result publication in the study. Otherwise, if automatic
10264                         publication is switched on, default value is used for result name.
10265
10266             Returns: 
10267                 New GEOM.GEOM_Object, containing the created face.
10268             
10269             Example of usage:
10270                 # create vertices
10271                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10272                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10273                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10274                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10275                 # create edges
10276                 edge1 = geompy.MakeEdge(p1, p2)
10277                 edge2 = geompy.MakeEdge(p3, p4)
10278                 # create a quadrangle face from two edges
10279                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10280             """
10281             # Example: see GEOM_Spanner.py
10282             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10283             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10284             self._autoPublish(anObj, theName, "quad")
10285             return anObj
10286
10287         ## Create a quadrangle face with specified corners.
10288         #  The missing edges will be built by creating the shortest ones.
10289         #  @param V1,V2,V3,V4 Corner vertices for the face.
10290         #  @param theName Object name; when specified, this parameter is used
10291         #         for result publication in the study. Otherwise, if automatic
10292         #         publication is switched on, default value is used for result name.
10293         #
10294         #  @return New GEOM.GEOM_Object, containing the created face.
10295         #
10296         #  @ref tui_building_by_blocks_page "Example 1"
10297         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10298         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10299             """
10300             Create a quadrangle face with specified corners.
10301             The missing edges will be built by creating the shortest ones.
10302
10303             Parameters: 
10304                 V1,V2,V3,V4 Corner vertices for the face.
10305                 theName Object name; when specified, this parameter is used
10306                         for result publication in the study. Otherwise, if automatic
10307                         publication is switched on, default value is used for result name.
10308
10309             Returns: 
10310                 New GEOM.GEOM_Object, containing the created face.
10311
10312             Example of usage:
10313                 # create vertices
10314                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10315                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10316                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10317                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10318                 # create a quadrangle from four points in its corners
10319                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10320             """
10321             # Example: see GEOM_Spanner.py
10322             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10323             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10324             self._autoPublish(anObj, theName, "quad")
10325             return anObj
10326
10327         ## Create a hexahedral solid, bounded by the six given faces. Order of
10328         #  faces is not important. It is  not necessary that Faces share the same edge.
10329         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10330         #  @param theName Object name; when specified, this parameter is used
10331         #         for result publication in the study. Otherwise, if automatic
10332         #         publication is switched on, default value is used for result name.
10333         #
10334         #  @return New GEOM.GEOM_Object, containing the created solid.
10335         #
10336         #  @ref tui_building_by_blocks_page "Example 1"
10337         #  \n @ref swig_MakeHexa "Example 2"
10338         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10339             """
10340             Create a hexahedral solid, bounded by the six given faces. Order of
10341             faces is not important. It is  not necessary that Faces share the same edge.
10342
10343             Parameters: 
10344                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10345                 theName Object name; when specified, this parameter is used
10346                         for result publication in the study. Otherwise, if automatic
10347                         publication is switched on, default value is used for result name.
10348
10349             Returns:    
10350                 New GEOM.GEOM_Object, containing the created solid.
10351
10352             Example of usage:
10353                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10354             """
10355             # Example: see GEOM_Spanner.py
10356             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10357             RaiseIfFailed("MakeHexa", self.BlocksOp)
10358             self._autoPublish(anObj, theName, "hexa")
10359             return anObj
10360
10361         ## Create a hexahedral solid between two given faces.
10362         #  The missing faces will be built by creating the smallest ones.
10363         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10364         #  @param theName Object name; when specified, this parameter is used
10365         #         for result publication in the study. Otherwise, if automatic
10366         #         publication is switched on, default value is used for result name.
10367         #
10368         #  @return New GEOM.GEOM_Object, containing the created solid.
10369         #
10370         #  @ref tui_building_by_blocks_page "Example 1"
10371         #  \n @ref swig_MakeHexa2Faces "Example 2"
10372         def MakeHexa2Faces(self, F1, F2, theName=None):
10373             """
10374             Create a hexahedral solid between two given faces.
10375             The missing faces will be built by creating the smallest ones.
10376
10377             Parameters: 
10378                 F1,F2 Two opposite faces for the hexahedral solid.
10379                 theName Object name; when specified, this parameter is used
10380                         for result publication in the study. Otherwise, if automatic
10381                         publication is switched on, default value is used for result name.
10382
10383             Returns:
10384                 New GEOM.GEOM_Object, containing the created solid.
10385
10386             Example of usage:
10387                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10388             """
10389             # Example: see GEOM_Spanner.py
10390             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10391             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10392             self._autoPublish(anObj, theName, "hexa")
10393             return anObj
10394
10395         # end of l3_blocks
10396         ## @}
10397
10398         ## @addtogroup l3_blocks_op
10399         ## @{
10400
10401         ## Get a vertex, found in the given shape by its coordinates.
10402         #  @param theShape Block or a compound of blocks.
10403         #  @param theX,theY,theZ Coordinates of the sought vertex.
10404         #  @param theEpsilon Maximum allowed distance between the resulting
10405         #                    vertex and point with the given coordinates.
10406         #  @param theName Object name; when specified, this parameter is used
10407         #         for result publication in the study. Otherwise, if automatic
10408         #         publication is switched on, default value is used for result name.
10409         #
10410         #  @return New GEOM.GEOM_Object, containing the found vertex.
10411         #
10412         #  @ref swig_GetPoint "Example"
10413         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10414             """
10415             Get a vertex, found in the given shape by its coordinates.
10416
10417             Parameters: 
10418                 theShape Block or a compound of blocks.
10419                 theX,theY,theZ Coordinates of the sought vertex.
10420                 theEpsilon Maximum allowed distance between the resulting
10421                            vertex and point with the given coordinates.
10422                 theName Object name; when specified, this parameter is used
10423                         for result publication in the study. Otherwise, if automatic
10424                         publication is switched on, default value is used for result name.
10425
10426             Returns:                  
10427                 New GEOM.GEOM_Object, containing the found vertex.
10428
10429             Example of usage:
10430                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10431             """
10432             # Example: see GEOM_TestOthers.py
10433             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10434             RaiseIfFailed("GetPoint", self.BlocksOp)
10435             self._autoPublish(anObj, theName, "vertex")
10436             return anObj
10437
10438         ## Find a vertex of the given shape, which has minimal distance to the given point.
10439         #  @param theShape Any shape.
10440         #  @param thePoint Point, close to the desired vertex.
10441         #  @param theName Object name; when specified, this parameter is used
10442         #         for result publication in the study. Otherwise, if automatic
10443         #         publication is switched on, default value is used for result name.
10444         #
10445         #  @return New GEOM.GEOM_Object, containing the found vertex.
10446         #
10447         #  @ref swig_GetVertexNearPoint "Example"
10448         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10449             """
10450             Find a vertex of the given shape, which has minimal distance to the given point.
10451
10452             Parameters: 
10453                 theShape Any shape.
10454                 thePoint Point, close to the desired vertex.
10455                 theName Object name; when specified, this parameter is used
10456                         for result publication in the study. Otherwise, if automatic
10457                         publication is switched on, default value is used for result name.
10458
10459             Returns:
10460                 New GEOM.GEOM_Object, containing the found vertex.
10461
10462             Example of usage:
10463                 pmidle = geompy.MakeVertex(50, 0, 50)
10464                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10465             """
10466             # Example: see GEOM_TestOthers.py
10467             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10468             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10469             self._autoPublish(anObj, theName, "vertex")
10470             return anObj
10471
10472         ## Get an edge, found in the given shape by two given vertices.
10473         #  @param theShape Block or a compound of blocks.
10474         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10475         #  @param 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         #  @return New GEOM.GEOM_Object, containing the found edge.
10480         #
10481         #  @ref swig_GetEdge "Example"
10482         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10483             """
10484             Get an edge, found in the given shape by two given vertices.
10485
10486             Parameters: 
10487                 theShape Block or a compound of blocks.
10488                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10489                 theName Object name; when specified, this parameter is used
10490                         for result publication in the study. Otherwise, if automatic
10491                         publication is switched on, default value is used for result name.
10492
10493             Returns:
10494                 New GEOM.GEOM_Object, containing the found edge.
10495             """
10496             # Example: see GEOM_Spanner.py
10497             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10498             RaiseIfFailed("GetEdge", self.BlocksOp)
10499             self._autoPublish(anObj, theName, "edge")
10500             return anObj
10501
10502         ## Find an edge of the given shape, which has minimal distance to the given point.
10503         #  @param theShape Block or a compound of blocks.
10504         #  @param thePoint Point, close to the desired edge.
10505         #  @param theName Object name; when specified, this parameter is used
10506         #         for result publication in the study. Otherwise, if automatic
10507         #         publication is switched on, default value is used for result name.
10508         #
10509         #  @return New GEOM.GEOM_Object, containing the found edge.
10510         #
10511         #  @ref swig_GetEdgeNearPoint "Example"
10512         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10513             """
10514             Find an edge of the given shape, which has minimal distance to the given point.
10515
10516             Parameters: 
10517                 theShape Block or a compound of blocks.
10518                 thePoint Point, close to the desired edge.
10519                 theName Object name; when specified, this parameter is used
10520                         for result publication in the study. Otherwise, if automatic
10521                         publication is switched on, default value is used for result name.
10522
10523             Returns:
10524                 New GEOM.GEOM_Object, containing the found edge.
10525             """
10526             # Example: see GEOM_TestOthers.py
10527             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10528             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10529             self._autoPublish(anObj, theName, "edge")
10530             return anObj
10531
10532         ## Returns a face, found in the given shape by four given corner vertices.
10533         #  @param theShape Block or a compound of blocks.
10534         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10535         #  @param theName Object name; when specified, this parameter is used
10536         #         for result publication in the study. Otherwise, if automatic
10537         #         publication is switched on, default value is used for result name.
10538         #
10539         #  @return New GEOM.GEOM_Object, containing the found face.
10540         #
10541         #  @ref swig_todo "Example"
10542         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10543             """
10544             Returns a face, found in the given shape by four given corner vertices.
10545
10546             Parameters:
10547                 theShape Block or a compound of blocks.
10548                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10549                 theName Object name; when specified, this parameter is used
10550                         for result publication in the study. Otherwise, if automatic
10551                         publication is switched on, default value is used for result name.
10552
10553             Returns:
10554                 New GEOM.GEOM_Object, containing the found face.
10555             """
10556             # Example: see GEOM_Spanner.py
10557             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10558             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10559             self._autoPublish(anObj, theName, "face")
10560             return anObj
10561
10562         ## Get a face of block, found in the given shape by two given edges.
10563         #  @param theShape Block or a compound of blocks.
10564         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10565         #  @param theName Object name; when specified, this parameter is used
10566         #         for result publication in the study. Otherwise, if automatic
10567         #         publication is switched on, default value is used for result name.
10568         #
10569         #  @return New GEOM.GEOM_Object, containing the found face.
10570         #
10571         #  @ref swig_todo "Example"
10572         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10573             """
10574             Get a face of block, found in the given shape by two given edges.
10575
10576             Parameters:
10577                 theShape Block or a compound of blocks.
10578                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10579                 theName Object name; when specified, this parameter is used
10580                         for result publication in the study. Otherwise, if automatic
10581                         publication is switched on, default value is used for result name.
10582
10583             Returns:
10584                 New GEOM.GEOM_Object, containing the found face.
10585             """
10586             # Example: see GEOM_Spanner.py
10587             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10588             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10589             self._autoPublish(anObj, theName, "face")
10590             return anObj
10591
10592         ## Find a face, opposite to the given one in the given block.
10593         #  @param theBlock Must be a hexahedral solid.
10594         #  @param theFace Face of \a theBlock, opposite to the desired face.
10595         #  @param theName Object name; when specified, this parameter is used
10596         #         for result publication in the study. Otherwise, if automatic
10597         #         publication is switched on, default value is used for result name.
10598         #
10599         #  @return New GEOM.GEOM_Object, containing the found face.
10600         #
10601         #  @ref swig_GetOppositeFace "Example"
10602         def GetOppositeFace(self, theBlock, theFace, theName=None):
10603             """
10604             Find a face, opposite to the given one in the given block.
10605
10606             Parameters:
10607                 theBlock Must be a hexahedral solid.
10608                 theFace Face of theBlock, opposite to the desired face.
10609                 theName Object name; when specified, this parameter is used
10610                         for result publication in the study. Otherwise, if automatic
10611                         publication is switched on, default value is used for result name.
10612
10613             Returns: 
10614                 New GEOM.GEOM_Object, containing the found face.
10615             """
10616             # Example: see GEOM_Spanner.py
10617             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10618             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10619             self._autoPublish(anObj, theName, "face")
10620             return anObj
10621
10622         ## Find a face of the given shape, which has minimal distance to the given point.
10623         #  @param theShape Block or a compound of blocks.
10624         #  @param thePoint Point, close to the desired face.
10625         #  @param theName Object name; when specified, this parameter is used
10626         #         for result publication in the study. Otherwise, if automatic
10627         #         publication is switched on, default value is used for result name.
10628         #
10629         #  @return New GEOM.GEOM_Object, containing the found face.
10630         #
10631         #  @ref swig_GetFaceNearPoint "Example"
10632         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10633             """
10634             Find a face of the given shape, which has minimal distance to the given point.
10635
10636             Parameters:
10637                 theShape Block or a compound of blocks.
10638                 thePoint Point, close to the desired face.
10639                 theName Object name; when specified, this parameter is used
10640                         for result publication in the study. Otherwise, if automatic
10641                         publication is switched on, default value is used for result name.
10642
10643             Returns:
10644                 New GEOM.GEOM_Object, containing the found face.
10645             """
10646             # Example: see GEOM_Spanner.py
10647             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10648             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10649             self._autoPublish(anObj, theName, "face")
10650             return anObj
10651
10652         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10653         #  @param theBlock Block or a compound of blocks.
10654         #  @param theVector Vector, close to the normale of the desired face.
10655         #  @param theName Object name; when specified, this parameter is used
10656         #         for result publication in the study. Otherwise, if automatic
10657         #         publication is switched on, default value is used for result name.
10658         #
10659         #  @return New GEOM.GEOM_Object, containing the found face.
10660         #
10661         #  @ref swig_todo "Example"
10662         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10663             """
10664             Find a face of block, whose outside normale has minimal angle with the given vector.
10665
10666             Parameters:
10667                 theBlock Block or a compound of blocks.
10668                 theVector Vector, close to the normale of the desired face.
10669                 theName Object name; when specified, this parameter is used
10670                         for result publication in the study. Otherwise, if automatic
10671                         publication is switched on, default value is used for result name.
10672
10673             Returns:
10674                 New GEOM.GEOM_Object, containing the found face.
10675             """
10676             # Example: see GEOM_Spanner.py
10677             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10678             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10679             self._autoPublish(anObj, theName, "face")
10680             return anObj
10681
10682         ## Find all sub-shapes of type \a theShapeType of the given shape,
10683         #  which have minimal distance to the given point.
10684         #  @param theShape Any shape.
10685         #  @param thePoint Point, close to the desired shape.
10686         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10687         #  @param theTolerance The tolerance for distances comparison. All shapes
10688         #                      with distances to the given point in interval
10689         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10690         #  @param theName Object name; when specified, this parameter is used
10691         #         for result publication in the study. Otherwise, if automatic
10692         #         publication is switched on, default value is used for result name.
10693         #
10694         #  @return New GEOM_Object, containing a group of all found shapes.
10695         #
10696         #  @ref swig_GetShapesNearPoint "Example"
10697         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10698             """
10699             Find all sub-shapes of type theShapeType of the given shape,
10700             which have minimal distance to the given point.
10701
10702             Parameters:
10703                 theShape Any shape.
10704                 thePoint Point, close to the desired shape.
10705                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10706                 theTolerance The tolerance for distances comparison. All shapes
10707                                 with distances to the given point in interval
10708                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10709                 theName Object name; when specified, this parameter is used
10710                         for result publication in the study. Otherwise, if automatic
10711                         publication is switched on, default value is used for result name.
10712
10713             Returns:
10714                 New GEOM_Object, containing a group of all found shapes.
10715             """
10716             # Example: see GEOM_TestOthers.py
10717             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10718             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10719             self._autoPublish(anObj, theName, "group")
10720             return anObj
10721
10722         # end of l3_blocks_op
10723         ## @}
10724
10725         ## @addtogroup l4_blocks_measure
10726         ## @{
10727
10728         ## Check, if the compound of blocks is given.
10729         #  To be considered as a compound of blocks, the
10730         #  given shape must satisfy the following conditions:
10731         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10732         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10733         #  - The compound should be connexe.
10734         #  - The glue between two quadrangle faces should be applied.
10735         #  @param theCompound The compound to check.
10736         #  @return TRUE, if the given shape is a compound of blocks.
10737         #  If theCompound is not valid, prints all discovered errors.
10738         #
10739         #  @ref tui_measurement_tools_page "Example 1"
10740         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10741         def CheckCompoundOfBlocks(self,theCompound):
10742             """
10743             Check, if the compound of blocks is given.
10744             To be considered as a compound of blocks, the
10745             given shape must satisfy the following conditions:
10746             - Each element of the compound should be a Block (6 faces and 12 edges).
10747             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10748             - The compound should be connexe.
10749             - The glue between two quadrangle faces should be applied.
10750
10751             Parameters:
10752                 theCompound The compound to check.
10753
10754             Returns:
10755                 TRUE, if the given shape is a compound of blocks.
10756                 If theCompound is not valid, prints all discovered errors.            
10757             """
10758             # Example: see GEOM_Spanner.py
10759             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10760             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10761             if IsValid == 0:
10762                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10763                 print Descr
10764             return IsValid
10765
10766         ## Retrieve all non blocks solids and faces from \a theShape.
10767         #  @param theShape The shape to explore.
10768         #  @param theName Object name; when specified, this parameter is used
10769         #         for result publication in the study. Otherwise, if automatic
10770         #         publication is switched on, default value is used for result name.
10771         #
10772         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10773         #          non block solids (= not 6 faces, or with 6 faces, but with the
10774         #          presence of non-quadrangular faces). The second object is a
10775         #          group of all non quadrangular faces.
10776         #
10777         #  @ref tui_measurement_tools_page "Example 1"
10778         #  \n @ref swig_GetNonBlocks "Example 2"
10779         def GetNonBlocks (self, theShape, theName=None):
10780             """
10781             Retrieve all non blocks solids and faces from theShape.
10782
10783             Parameters:
10784                 theShape The shape to explore.
10785                 theName Object name; when specified, this parameter is used
10786                         for result publication in the study. Otherwise, if automatic
10787                         publication is switched on, default value is used for result name.
10788
10789             Returns:
10790                 A tuple of two GEOM_Objects. The first object is a group of all
10791                 non block solids (= not 6 faces, or with 6 faces, but with the
10792                 presence of non-quadrangular faces). The second object is a
10793                 group of all non quadrangular faces.
10794
10795             Usage:
10796                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10797             """
10798             # Example: see GEOM_Spanner.py
10799             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10800             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10801             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10802             return aTuple
10803
10804         ## Remove all seam and degenerated edges from \a theShape.
10805         #  Unite faces and edges, sharing one surface. It means that
10806         #  this faces must have references to one C++ surface object (handle).
10807         #  @param theShape The compound or single solid to remove irregular edges from.
10808         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10809         #         do not unite faces.
10810         #  @param theName Object name; when specified, this parameter is used
10811         #         for result publication in the study. Otherwise, if automatic
10812         #         publication is switched on, default value is used for result name.
10813         #
10814         #  @return Improved shape.
10815         #
10816         #  @ref swig_RemoveExtraEdges "Example"
10817         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10818             """
10819             Remove all seam and degenerated edges from theShape.
10820             Unite faces and edges, sharing one surface. It means that
10821             this faces must have references to one C++ surface object (handle).
10822
10823             Parameters:
10824                 theShape The compound or single solid to remove irregular edges from.
10825                 doUnionFaces If True, then unite faces. If False (the default value),
10826                              do not unite faces.
10827                 theName Object name; when specified, this parameter is used
10828                         for result publication in the study. Otherwise, if automatic
10829                         publication is switched on, default value is used for result name.
10830
10831             Returns: 
10832                 Improved shape.
10833             """
10834             # Example: see GEOM_TestOthers.py
10835             nbFacesOptimum = -1 # -1 means do not unite faces
10836             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10837             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10838             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10839             self._autoPublish(anObj, theName, "removeExtraEdges")
10840             return anObj
10841
10842         ## Performs union faces of \a theShape
10843         #  Unite faces sharing one surface. It means that
10844         #  these faces must have references to one C++ surface object (handle).
10845         #  @param theShape The compound or single solid that contains faces
10846         #         to perform union.
10847         #  @param 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         #  @return Improved shape.
10852         #
10853         #  @ref swig_UnionFaces "Example"
10854         def UnionFaces(self, theShape, theName=None):
10855             """
10856             Performs union faces of theShape.
10857             Unite faces sharing one surface. It means that
10858             these faces must have references to one C++ surface object (handle).
10859
10860             Parameters:
10861                 theShape The compound or single solid that contains faces
10862                          to perform union.
10863                 theName Object name; when specified, this parameter is used
10864                         for result publication in the study. Otherwise, if automatic
10865                         publication is switched on, default value is used for result name.
10866
10867             Returns: 
10868                 Improved shape.
10869             """
10870             # Example: see GEOM_TestOthers.py
10871             anObj = self.BlocksOp.UnionFaces(theShape)
10872             RaiseIfFailed("UnionFaces", self.BlocksOp)
10873             self._autoPublish(anObj, theName, "unionFaces")
10874             return anObj
10875
10876         ## Check, if the given shape is a blocks compound.
10877         #  Fix all detected errors.
10878         #    \note Single block can be also fixed by this method.
10879         #  @param theShape The compound to check and improve.
10880         #  @param theName Object name; when specified, this parameter is used
10881         #         for result publication in the study. Otherwise, if automatic
10882         #         publication is switched on, default value is used for result name.
10883         #
10884         #  @return Improved compound.
10885         #
10886         #  @ref swig_CheckAndImprove "Example"
10887         def CheckAndImprove(self, theShape, theName=None):
10888             """
10889             Check, if the given shape is a blocks compound.
10890             Fix all detected errors.
10891
10892             Note:
10893                 Single block can be also fixed by this method.
10894
10895             Parameters:
10896                 theShape The compound to check and improve.
10897                 theName Object name; when specified, this parameter is used
10898                         for result publication in the study. Otherwise, if automatic
10899                         publication is switched on, default value is used for result name.
10900
10901             Returns: 
10902                 Improved compound.
10903             """
10904             # Example: see GEOM_TestOthers.py
10905             anObj = self.BlocksOp.CheckAndImprove(theShape)
10906             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10907             self._autoPublish(anObj, theName, "improved")
10908             return anObj
10909
10910         # end of l4_blocks_measure
10911         ## @}
10912
10913         ## @addtogroup l3_blocks_op
10914         ## @{
10915
10916         ## Get all the blocks, contained in the given compound.
10917         #  @param theCompound The compound to explode.
10918         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10919         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
10920         #  @param theName Object name; when specified, this parameter is used
10921         #         for result publication in the study. Otherwise, if automatic
10922         #         publication is switched on, default value is used for result name.
10923         #
10924         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10925         #
10926         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10927         #
10928         #  @ref tui_explode_on_blocks "Example 1"
10929         #  \n @ref swig_MakeBlockExplode "Example 2"
10930         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10931             """
10932             Get all the blocks, contained in the given compound.
10933
10934             Parameters:
10935                 theCompound The compound to explode.
10936                 theMinNbFaces If solid has lower number of faces, it is not a block.
10937                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10938                 theName Object name; when specified, this parameter is used
10939                         for result publication in the study. Otherwise, if automatic
10940                         publication is switched on, default value is used for result name.
10941
10942             Note:
10943                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10944
10945             Returns:  
10946                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10947             """
10948             # Example: see GEOM_TestOthers.py
10949             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10950             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10951             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10952             for anObj in aList:
10953                 anObj.SetParameters(Parameters)
10954                 pass
10955             self._autoPublish(aList, theName, "block")
10956             return aList
10957
10958         ## Find block, containing the given point inside its volume or on boundary.
10959         #  @param theCompound Compound, to find block in.
10960         #  @param thePoint Point, close to the desired block. If the point lays on
10961         #         boundary between some blocks, we return block with nearest center.
10962         #  @param theName Object name; when specified, this parameter is used
10963         #         for result publication in the study. Otherwise, if automatic
10964         #         publication is switched on, default value is used for result name.
10965         #
10966         #  @return New GEOM.GEOM_Object, containing the found block.
10967         #
10968         #  @ref swig_todo "Example"
10969         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10970             """
10971             Find block, containing the given point inside its volume or on boundary.
10972
10973             Parameters:
10974                 theCompound Compound, to find block in.
10975                 thePoint Point, close to the desired block. If the point lays on
10976                          boundary between some blocks, we return block with nearest center.
10977                 theName Object name; when specified, this parameter is used
10978                         for result publication in the study. Otherwise, if automatic
10979                         publication is switched on, default value is used for result name.
10980
10981             Returns:
10982                 New GEOM.GEOM_Object, containing the found block.
10983             """
10984             # Example: see GEOM_Spanner.py
10985             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
10986             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
10987             self._autoPublish(anObj, theName, "block")
10988             return anObj
10989
10990         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10991         #  @param theCompound Compound, to find block in.
10992         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
10993         #  @param theName Object name; when specified, this parameter is used
10994         #         for result publication in the study. Otherwise, if automatic
10995         #         publication is switched on, default value is used for result name.
10996         #
10997         #  @return New GEOM.GEOM_Object, containing the found block.
10998         #
10999         #  @ref swig_GetBlockByParts "Example"
11000         def GetBlockByParts(self, theCompound, theParts, theName=None):
11001             """
11002              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11003
11004              Parameters:
11005                 theCompound Compound, to find block in.
11006                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11007                 theName Object name; when specified, this parameter is used
11008                         for result publication in the study. Otherwise, if automatic
11009                         publication is switched on, default value is used for result name.
11010
11011             Returns: 
11012                 New GEOM_Object, containing the found block.
11013             """
11014             # Example: see GEOM_TestOthers.py
11015             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11016             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11017             self._autoPublish(anObj, theName, "block")
11018             return anObj
11019
11020         ## Return all blocks, containing all the elements, passed as the parts.
11021         #  @param theCompound Compound, to find blocks in.
11022         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11023         #  @param theName Object name; when specified, this parameter is used
11024         #         for result publication in the study. Otherwise, if automatic
11025         #         publication is switched on, default value is used for result name.
11026         #
11027         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11028         #
11029         #  @ref swig_todo "Example"
11030         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11031             """
11032             Return all blocks, containing all the elements, passed as the parts.
11033
11034             Parameters:
11035                 theCompound Compound, to find blocks in.
11036                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11037                 theName Object name; when specified, this parameter is used
11038                         for result publication in the study. Otherwise, if automatic
11039                         publication is switched on, default value is used for result name.
11040
11041             Returns:
11042                 List of GEOM.GEOM_Object, containing the found blocks.
11043             """
11044             # Example: see GEOM_Spanner.py
11045             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11046             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11047             self._autoPublish(aList, theName, "block")
11048             return aList
11049
11050         ## Multi-transformate block and glue the result.
11051         #  Transformation is defined so, as to superpose direction faces.
11052         #  @param Block Hexahedral solid to be multi-transformed.
11053         #  @param DirFace1 ID of First direction face.
11054         #  @param DirFace2 ID of Second direction face.
11055         #  @param NbTimes Quantity of transformations to be done.
11056         #  @param theName Object name; when specified, this parameter is used
11057         #         for result publication in the study. Otherwise, if automatic
11058         #         publication is switched on, default value is used for result name.
11059         #
11060         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11061         #
11062         #  @return New GEOM.GEOM_Object, containing the result shape.
11063         #
11064         #  @ref tui_multi_transformation "Example"
11065         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11066             """
11067             Multi-transformate block and glue the result.
11068             Transformation is defined so, as to superpose direction faces.
11069
11070             Parameters:
11071                 Block Hexahedral solid to be multi-transformed.
11072                 DirFace1 ID of First direction face.
11073                 DirFace2 ID of Second direction face.
11074                 NbTimes Quantity of transformations to be done.
11075                 theName Object name; when specified, this parameter is used
11076                         for result publication in the study. Otherwise, if automatic
11077                         publication is switched on, default value is used for result name.
11078
11079             Note:
11080                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11081
11082             Returns:
11083                 New GEOM.GEOM_Object, containing the result shape.
11084             """
11085             # Example: see GEOM_Spanner.py
11086             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11087             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11088             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11089             anObj.SetParameters(Parameters)
11090             self._autoPublish(anObj, theName, "transformed")
11091             return anObj
11092
11093         ## Multi-transformate block and glue the result.
11094         #  @param Block Hexahedral solid to be multi-transformed.
11095         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11096         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11097         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11098         #  @param theName Object name; when specified, this parameter is used
11099         #         for result publication in the study. Otherwise, if automatic
11100         #         publication is switched on, default value is used for result name.
11101         #
11102         #  @return New GEOM.GEOM_Object, containing the result shape.
11103         #
11104         #  @ref tui_multi_transformation "Example"
11105         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11106                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11107             """
11108             Multi-transformate block and glue the result.
11109
11110             Parameters:
11111                 Block Hexahedral solid to be multi-transformed.
11112                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11113                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11114                 NbTimesU,NbTimesV Quantity of transformations to be done.
11115                 theName Object name; when specified, this parameter is used
11116                         for result publication in the study. Otherwise, if automatic
11117                         publication is switched on, default value is used for result name.
11118
11119             Returns:
11120                 New GEOM.GEOM_Object, containing the result shape.
11121             """
11122             # Example: see GEOM_Spanner.py
11123             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11124               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11125             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11126                                                             DirFace1V, DirFace2V, NbTimesV)
11127             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11128             anObj.SetParameters(Parameters)
11129             self._autoPublish(anObj, theName, "transformed")
11130             return anObj
11131
11132         ## Build all possible propagation groups.
11133         #  Propagation group is a set of all edges, opposite to one (main)
11134         #  edge of this group directly or through other opposite edges.
11135         #  Notion of Opposite Edge make sence only on quadrangle face.
11136         #  @param theShape Shape to build propagation groups on.
11137         #  @param theName Object name; when specified, this parameter is used
11138         #         for result publication in the study. Otherwise, if automatic
11139         #         publication is switched on, default value is used for result name.
11140         #
11141         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11142         #
11143         #  @ref swig_Propagate "Example"
11144         def Propagate(self, theShape, theName=None):
11145             """
11146             Build all possible propagation groups.
11147             Propagation group is a set of all edges, opposite to one (main)
11148             edge of this group directly or through other opposite edges.
11149             Notion of Opposite Edge make sence only on quadrangle face.
11150
11151             Parameters:
11152                 theShape Shape to build propagation groups on.
11153                 theName Object name; when specified, this parameter is used
11154                         for result publication in the study. Otherwise, if automatic
11155                         publication is switched on, default value is used for result name.
11156
11157             Returns:
11158                 List of GEOM.GEOM_Object, each of them is a propagation group.
11159             """
11160             # Example: see GEOM_TestOthers.py
11161             listChains = self.BlocksOp.Propagate(theShape)
11162             RaiseIfFailed("Propagate", self.BlocksOp)
11163             self._autoPublish(listChains, theName, "propagate")
11164             return listChains
11165
11166         # end of l3_blocks_op
11167         ## @}
11168
11169         ## @addtogroup l3_groups
11170         ## @{
11171
11172         ## Creates a new group which will store sub-shapes of theMainShape
11173         #  @param theMainShape is a GEOM object on which the group is selected
11174         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11175         #  @param theName Object name; when specified, this parameter is used
11176         #         for result publication in the study. Otherwise, if automatic
11177         #         publication is switched on, default value is used for result name.
11178         #
11179         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11180         #
11181         #  @ref tui_working_with_groups_page "Example 1"
11182         #  \n @ref swig_CreateGroup "Example 2"
11183         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11184             """
11185             Creates a new group which will store sub-shapes of theMainShape
11186
11187             Parameters:
11188                theMainShape is a GEOM object on which the group is selected
11189                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11190                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11191                 theName Object name; when specified, this parameter is used
11192                         for result publication in the study. Otherwise, if automatic
11193                         publication is switched on, default value is used for result name.
11194
11195             Returns:
11196                a newly created GEOM group
11197
11198             Example of usage:
11199                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11200                 
11201             """
11202             # Example: see GEOM_TestOthers.py
11203             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11204             RaiseIfFailed("CreateGroup", self.GroupOp)
11205             self._autoPublish(anObj, theName, "group")
11206             return anObj
11207
11208         ## Adds a sub-object with ID theSubShapeId to the group
11209         #  @param theGroup is a GEOM group to which the new sub-shape is added
11210         #  @param theSubShapeID is a sub-shape ID in the main object.
11211         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11212         #
11213         #  @ref tui_working_with_groups_page "Example"
11214         def AddObject(self,theGroup, theSubShapeID):
11215             """
11216             Adds a sub-object with ID theSubShapeId to the group
11217
11218             Parameters:
11219                 theGroup       is a GEOM group to which the new sub-shape is added
11220                 theSubShapeID  is a sub-shape ID in the main object.
11221
11222             Note:
11223                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11224             """
11225             # Example: see GEOM_TestOthers.py
11226             self.GroupOp.AddObject(theGroup, theSubShapeID)
11227             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11228                 RaiseIfFailed("AddObject", self.GroupOp)
11229                 pass
11230             pass
11231
11232         ## Removes a sub-object with ID \a theSubShapeId from the group
11233         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11234         #  @param theSubShapeID is a sub-shape ID in the main object.
11235         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11236         #
11237         #  @ref tui_working_with_groups_page "Example"
11238         def RemoveObject(self,theGroup, theSubShapeID):
11239             """
11240             Removes a sub-object with ID theSubShapeId from the group
11241
11242             Parameters:
11243                 theGroup is a GEOM group from which the new sub-shape is removed
11244                 theSubShapeID is a sub-shape ID in the main object.
11245
11246             Note:
11247                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11248             """
11249             # Example: see GEOM_TestOthers.py
11250             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11251             RaiseIfFailed("RemoveObject", self.GroupOp)
11252             pass
11253
11254         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11255         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11256         #  @param theSubShapes is a list of sub-shapes to be added.
11257         #
11258         #  @ref tui_working_with_groups_page "Example"
11259         def UnionList (self,theGroup, theSubShapes):
11260             """
11261             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11262
11263             Parameters:
11264                 theGroup is a GEOM group to which the new sub-shapes are added.
11265                 theSubShapes is a list of sub-shapes to be added.
11266             """
11267             # Example: see GEOM_TestOthers.py
11268             self.GroupOp.UnionList(theGroup, theSubShapes)
11269             RaiseIfFailed("UnionList", self.GroupOp)
11270             pass
11271
11272         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11273         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11274         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11275         #
11276         #  @ref swig_UnionIDs "Example"
11277         def UnionIDs(self,theGroup, theSubShapes):
11278             """
11279             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11280
11281             Parameters:
11282                 theGroup is a GEOM group to which the new sub-shapes are added.
11283                 theSubShapes is a list of indices of sub-shapes to be added.
11284             """
11285             # Example: see GEOM_TestOthers.py
11286             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11287             RaiseIfFailed("UnionIDs", self.GroupOp)
11288             pass
11289
11290         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11291         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11292         #  @param theSubShapes is a list of sub-shapes to be removed.
11293         #
11294         #  @ref tui_working_with_groups_page "Example"
11295         def DifferenceList (self,theGroup, theSubShapes):
11296             """
11297             Removes from the group all the given shapes. No errors, if some shapes are not included.
11298
11299             Parameters:
11300                 theGroup is a GEOM group from which the sub-shapes are removed.
11301                 theSubShapes is a list of sub-shapes to be removed.
11302             """
11303             # Example: see GEOM_TestOthers.py
11304             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11305             RaiseIfFailed("DifferenceList", self.GroupOp)
11306             pass
11307
11308         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11309         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11310         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11311         #
11312         #  @ref swig_DifferenceIDs "Example"
11313         def DifferenceIDs(self,theGroup, theSubShapes):
11314             """
11315             Removes from the group all the given shapes. No errors, if some shapes are not included.
11316
11317             Parameters:
11318                 theGroup is a GEOM group from which the sub-shapes are removed.
11319                 theSubShapes is a list of indices of sub-shapes to be removed.
11320             """            
11321             # Example: see GEOM_TestOthers.py
11322             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11323             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11324             pass
11325
11326         ## Union of two groups.
11327         #  New group is created. It will contain all entities
11328         #  which are present in groups theGroup1 and theGroup2.
11329         #  @param theGroup1, theGroup2 are the initial GEOM groups
11330         #                              to create the united group from.
11331         #  @param theName Object name; when specified, this parameter is used
11332         #         for result publication in the study. Otherwise, if automatic
11333         #         publication is switched on, default value is used for result name.
11334         #
11335         #  @return a newly created GEOM group.
11336         #
11337         #  @ref tui_union_groups_anchor "Example"
11338         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11339             """
11340             Union of two groups.
11341             New group is created. It will contain all entities
11342             which are present in groups theGroup1 and theGroup2.
11343
11344             Parameters:
11345                 theGroup1, theGroup2 are the initial GEOM groups
11346                                      to create the united group from.
11347                 theName Object name; when specified, this parameter is used
11348                         for result publication in the study. Otherwise, if automatic
11349                         publication is switched on, default value is used for result name.
11350
11351             Returns:
11352                 a newly created GEOM group.
11353             """
11354             # Example: see GEOM_TestOthers.py
11355             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11356             RaiseIfFailed("UnionGroups", self.GroupOp)
11357             self._autoPublish(aGroup, theName, "group")
11358             return aGroup
11359
11360         ## Intersection of two groups.
11361         #  New group is created. It will contain only those entities
11362         #  which are present in both groups theGroup1 and theGroup2.
11363         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11364         #  @param theName Object name; when specified, this parameter is used
11365         #         for result publication in the study. Otherwise, if automatic
11366         #         publication is switched on, default value is used for result name.
11367         #
11368         #  @return a newly created GEOM group.
11369         #
11370         #  @ref tui_intersect_groups_anchor "Example"
11371         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11372             """
11373             Intersection of two groups.
11374             New group is created. It will contain only those entities
11375             which are present in both groups theGroup1 and theGroup2.
11376
11377             Parameters:
11378                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11379                 theName Object name; when specified, this parameter is used
11380                         for result publication in the study. Otherwise, if automatic
11381                         publication is switched on, default value is used for result name.
11382
11383             Returns:
11384                 a newly created GEOM group.
11385             """
11386             # Example: see GEOM_TestOthers.py
11387             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11388             RaiseIfFailed("IntersectGroups", self.GroupOp)
11389             self._autoPublish(aGroup, theName, "group")
11390             return aGroup
11391
11392         ## Cut of two groups.
11393         #  New group is created. It will contain entities which are
11394         #  present in group theGroup1 but are not present in group theGroup2.
11395         #  @param theGroup1 is a GEOM group to include elements of.
11396         #  @param theGroup2 is a GEOM group to exclude elements of.
11397         #  @param theName Object name; when specified, this parameter is used
11398         #         for result publication in the study. Otherwise, if automatic
11399         #         publication is switched on, default value is used for result name.
11400         #
11401         #  @return a newly created GEOM group.
11402         #
11403         #  @ref tui_cut_groups_anchor "Example"
11404         def CutGroups (self, theGroup1, theGroup2, theName=None):
11405             """
11406             Cut of two groups.
11407             New group is created. It will contain entities which are
11408             present in group theGroup1 but are not present in group theGroup2.
11409
11410             Parameters:
11411                 theGroup1 is a GEOM group to include elements of.
11412                 theGroup2 is a GEOM group to exclude elements of.
11413                 theName Object name; when specified, this parameter is used
11414                         for result publication in the study. Otherwise, if automatic
11415                         publication is switched on, default value is used for result name.
11416
11417             Returns:
11418                 a newly created GEOM group.
11419             """
11420             # Example: see GEOM_TestOthers.py
11421             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11422             RaiseIfFailed("CutGroups", self.GroupOp)
11423             self._autoPublish(aGroup, theName, "group")
11424             return aGroup
11425
11426         ## Union of list of groups.
11427         #  New group is created. It will contain all entities that are
11428         #  present in groups listed in theGList.
11429         #  @param theGList is a list of GEOM groups to create the united group from.
11430         #  @param theName Object name; when specified, this parameter is used
11431         #         for result publication in the study. Otherwise, if automatic
11432         #         publication is switched on, default value is used for result name.
11433         #
11434         #  @return a newly created GEOM group.
11435         #
11436         #  @ref tui_union_groups_anchor "Example"
11437         def UnionListOfGroups (self, theGList, theName=None):
11438             """
11439             Union of list of groups.
11440             New group is created. It will contain all entities that are
11441             present in groups listed in theGList.
11442
11443             Parameters:
11444                 theGList is a list of GEOM groups to create the united group from.
11445                 theName Object name; when specified, this parameter is used
11446                         for result publication in the study. Otherwise, if automatic
11447                         publication is switched on, default value is used for result name.
11448
11449             Returns:
11450                 a newly created GEOM group.
11451             """
11452             # Example: see GEOM_TestOthers.py
11453             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11454             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11455             self._autoPublish(aGroup, theName, "group")
11456             return aGroup
11457
11458         ## Cut of lists of groups.
11459         #  New group is created. It will contain only entities
11460         #  which are present in groups listed in theGList.
11461         #  @param theGList is a list of GEOM groups to include elements of.
11462         #  @param theName Object name; when specified, this parameter is used
11463         #         for result publication in the study. Otherwise, if automatic
11464         #         publication is switched on, default value is used for result name.
11465         #
11466         #  @return a newly created GEOM group.
11467         #
11468         #  @ref tui_intersect_groups_anchor "Example"
11469         def IntersectListOfGroups (self, theGList, theName=None):
11470             """
11471             Cut of lists of groups.
11472             New group is created. It will contain only entities
11473             which are present in groups listed in theGList.
11474
11475             Parameters:
11476                 theGList is a list of GEOM groups to include elements of.
11477                 theName Object name; when specified, this parameter is used
11478                         for result publication in the study. Otherwise, if automatic
11479                         publication is switched on, default value is used for result name.
11480
11481             Returns:
11482                 a newly created GEOM group.
11483             """
11484             # Example: see GEOM_TestOthers.py
11485             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11486             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11487             self._autoPublish(aGroup, theName, "group")
11488             return aGroup
11489
11490         ## Cut of lists of groups.
11491         #  New group is created. It will contain only entities
11492         #  which are present in groups listed in theGList1 but 
11493         #  are not present in groups from theGList2.
11494         #  @param theGList1 is a list of GEOM groups to include elements of.
11495         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11496         #  @param theName Object name; when specified, this parameter is used
11497         #         for result publication in the study. Otherwise, if automatic
11498         #         publication is switched on, default value is used for result name.
11499         #
11500         #  @return a newly created GEOM group.
11501         #
11502         #  @ref tui_cut_groups_anchor "Example"
11503         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11504             """
11505             Cut of lists of groups.
11506             New group is created. It will contain only entities
11507             which are present in groups listed in theGList1 but 
11508             are not present in groups from theGList2.
11509
11510             Parameters:
11511                 theGList1 is a list of GEOM groups to include elements of.
11512                 theGList2 is a list of GEOM groups to exclude elements of.
11513                 theName Object name; when specified, this parameter is used
11514                         for result publication in the study. Otherwise, if automatic
11515                         publication is switched on, default value is used for result name.
11516
11517             Returns:
11518                 a newly created GEOM group.
11519             """
11520             # Example: see GEOM_TestOthers.py
11521             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11522             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11523             self._autoPublish(aGroup, theName, "group")
11524             return aGroup
11525
11526         ## Returns a list of sub-objects ID stored in the group
11527         #  @param theGroup is a GEOM group for which a list of IDs is requested
11528         #
11529         #  @ref swig_GetObjectIDs "Example"
11530         def GetObjectIDs(self,theGroup):
11531             """
11532             Returns a list of sub-objects ID stored in the group
11533
11534             Parameters:
11535                 theGroup is a GEOM group for which a list of IDs is requested
11536             """
11537             # Example: see GEOM_TestOthers.py
11538             ListIDs = self.GroupOp.GetObjects(theGroup)
11539             RaiseIfFailed("GetObjects", self.GroupOp)
11540             return ListIDs
11541
11542         ## Returns a type of sub-objects stored in the group
11543         #  @param theGroup is a GEOM group which type is returned.
11544         #
11545         #  @ref swig_GetType "Example"
11546         def GetType(self,theGroup):
11547             """
11548             Returns a type of sub-objects stored in the group
11549
11550             Parameters:
11551                 theGroup is a GEOM group which type is returned.
11552             """
11553             # Example: see GEOM_TestOthers.py
11554             aType = self.GroupOp.GetType(theGroup)
11555             RaiseIfFailed("GetType", self.GroupOp)
11556             return aType
11557
11558         ## Convert a type of geom object from id to string value
11559         #  @param theId is a GEOM obect type id.
11560         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11561         #  @ref swig_GetType "Example"
11562         def ShapeIdToType(self, theId):
11563             """
11564             Convert a type of geom object from id to string value
11565
11566             Parameters:
11567                 theId is a GEOM obect type id.
11568                 
11569             Returns:
11570                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11571             """
11572             if theId == 0:
11573                 return "COPY"
11574             if theId == 1:
11575                 return "IMPORT"
11576             if theId == 2:
11577                 return "POINT"
11578             if theId == 3:
11579                 return "VECTOR"
11580             if theId == 4:
11581                 return "PLANE"
11582             if theId == 5:
11583                 return "LINE"
11584             if theId == 6:
11585                 return "TORUS"
11586             if theId == 7:
11587                 return "BOX"
11588             if theId == 8:
11589                 return "CYLINDER"
11590             if theId == 9:
11591                 return "CONE"
11592             if theId == 10:
11593                 return "SPHERE"
11594             if theId == 11:
11595                 return "PRISM"
11596             if theId == 12:
11597                 return "REVOLUTION"
11598             if theId == 13:
11599                 return "BOOLEAN"
11600             if theId == 14:
11601                 return "PARTITION"
11602             if theId == 15:
11603                 return "POLYLINE"
11604             if theId == 16:
11605                 return "CIRCLE"
11606             if theId == 17:
11607                 return "SPLINE"
11608             if theId == 18:
11609                 return "ELLIPSE"
11610             if theId == 19:
11611                 return "CIRC_ARC"
11612             if theId == 20:
11613                 return "FILLET"
11614             if theId == 21:
11615                 return "CHAMFER"
11616             if theId == 22:
11617                 return "EDGE"
11618             if theId == 23:
11619                 return "WIRE"
11620             if theId == 24:
11621                 return "FACE"
11622             if theId == 25:
11623                 return "SHELL"
11624             if theId == 26:
11625                 return "SOLID"
11626             if theId == 27:
11627                 return "COMPOUND"
11628             if theId == 28:
11629                 return "SUBSHAPE"
11630             if theId == 29:
11631                 return "PIPE"
11632             if theId == 30:
11633                 return "ARCHIMEDE"
11634             if theId == 31:
11635                 return "FILLING"
11636             if theId == 32:
11637                 return "EXPLODE"
11638             if theId == 33:
11639                 return "GLUED"
11640             if theId == 34:
11641                 return "SKETCHER"
11642             if theId == 35:
11643                 return "CDG"
11644             if theId == 36:
11645                 return "FREE_BOUNDS"
11646             if theId == 37:
11647                 return "GROUP"
11648             if theId == 38:
11649                 return "BLOCK"
11650             if theId == 39:
11651                 return "MARKER"
11652             if theId == 40:
11653                 return "THRUSECTIONS"
11654             if theId == 41:
11655                 return "COMPOUNDFILTER"
11656             if theId == 42:
11657                 return "SHAPES_ON_SHAPE"
11658             if theId == 43:
11659                 return "ELLIPSE_ARC"
11660             if theId == 44:
11661                 return "3DSKETCHER"
11662             if theId == 45:
11663                 return "FILLET_2D"
11664             if theId == 46:
11665                 return "FILLET_1D"
11666             if theId == 201:
11667                 return "PIPETSHAPE"
11668             return "Shape Id not exist."
11669
11670         ## Returns a main shape associated with the group
11671         #  @param theGroup is a GEOM group for which a main shape object is requested
11672         #  @return a GEOM object which is a main shape for theGroup
11673         #
11674         #  @ref swig_GetMainShape "Example"
11675         def GetMainShape(self,theGroup):
11676             """
11677             Returns a main shape associated with the group
11678
11679             Parameters:
11680                 theGroup is a GEOM group for which a main shape object is requested
11681
11682             Returns:
11683                 a GEOM object which is a main shape for theGroup
11684
11685             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11686             """
11687             # Example: see GEOM_TestOthers.py
11688             anObj = self.GroupOp.GetMainShape(theGroup)
11689             RaiseIfFailed("GetMainShape", self.GroupOp)
11690             return anObj
11691
11692         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11693         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11694         #  @param theShape given shape (see GEOM.GEOM_Object)
11695         #  @param min_length minimum length of edges of theShape
11696         #  @param max_length maximum length of edges of theShape
11697         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11698         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11699         #  @param theName Object name; when specified, this parameter is used
11700         #         for result publication in the study. Otherwise, if automatic
11701         #         publication is switched on, default value is used for result name.
11702         #
11703         #  @return a newly created GEOM group of edges
11704         #
11705         #  @@ref swig_todo "Example"
11706         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11707             """
11708             Create group of edges of theShape, whose length is in range [min_length, max_length].
11709             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11710
11711             Parameters:
11712                 theShape given shape
11713                 min_length minimum length of edges of theShape
11714                 max_length maximum length of edges of theShape
11715                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11716                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11717                 theName Object name; when specified, this parameter is used
11718                         for result publication in the study. Otherwise, if automatic
11719                         publication is switched on, default value is used for result name.
11720
11721              Returns:
11722                 a newly created GEOM group of edges.
11723             """
11724             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11725             edges_in_range = []
11726             for edge in edges:
11727                 Props = self.BasicProperties(edge)
11728                 if min_length <= Props[0] and Props[0] <= max_length:
11729                     if (not include_min) and (min_length == Props[0]):
11730                         skip = 1
11731                     else:
11732                         if (not include_max) and (Props[0] == max_length):
11733                             skip = 1
11734                         else:
11735                             edges_in_range.append(edge)
11736
11737             if len(edges_in_range) <= 0:
11738                 print "No edges found by given criteria"
11739                 return None
11740
11741             # note: auto-publishing is done in self.CreateGroup()
11742             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11743             self.UnionList(group_edges, edges_in_range)
11744
11745             return group_edges
11746
11747         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11748         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11749         #  @param min_length minimum length of edges of selected shape
11750         #  @param max_length maximum length of edges of selected shape
11751         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11752         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11753         #  @return a newly created GEOM group of edges
11754         #  @ref swig_todo "Example"
11755         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11756             """
11757             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11758             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11759
11760             Parameters:
11761                 min_length minimum length of edges of selected shape
11762                 max_length maximum length of edges of selected shape
11763                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11764                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11765
11766              Returns:
11767                 a newly created GEOM group of edges.
11768             """
11769             nb_selected = sg.SelectedCount()
11770             if nb_selected < 1:
11771                 print "Select a shape before calling this function, please."
11772                 return 0
11773             if nb_selected > 1:
11774                 print "Only one shape must be selected"
11775                 return 0
11776
11777             id_shape = sg.getSelected(0)
11778             shape = IDToObject( id_shape )
11779
11780             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11781
11782             left_str  = " < "
11783             right_str = " < "
11784             if include_min: left_str  = " <= "
11785             if include_max: right_str  = " <= "
11786
11787             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11788                                     + left_str + "length" + right_str + `max_length`)
11789
11790             sg.updateObjBrowser(1)
11791
11792             return group_edges
11793
11794         # end of l3_groups
11795         ## @}
11796
11797         ## @addtogroup l4_advanced
11798         ## @{
11799
11800         ## Create a T-shape object with specified caracteristics for the main
11801         #  and the incident pipes (radius, width, half-length).
11802         #  The extremities of the main pipe are located on junctions points P1 and P2.
11803         #  The extremity of the incident pipe is located on junction point P3.
11804         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11805         #  the main plane of the T-shape is XOY.
11806         #
11807         #  @param theR1 Internal radius of main pipe
11808         #  @param theW1 Width of main pipe
11809         #  @param theL1 Half-length of main pipe
11810         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11811         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11812         #  @param theL2 Half-length of incident pipe
11813         #
11814         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11815         #  @param theP1 1st junction point of main pipe
11816         #  @param theP2 2nd junction point of main pipe
11817         #  @param theP3 Junction point of incident pipe
11818         #
11819         #  @param theRL Internal radius of left thickness reduction
11820         #  @param theWL Width of left thickness reduction
11821         #  @param theLtransL Length of left transition part
11822         #  @param theLthinL Length of left thin part
11823         #
11824         #  @param theRR Internal radius of right thickness reduction
11825         #  @param theWR Width of right thickness reduction
11826         #  @param theLtransR Length of right transition part
11827         #  @param theLthinR Length of right thin part
11828         #
11829         #  @param theRI Internal radius of incident thickness reduction
11830         #  @param theWI Width of incident thickness reduction
11831         #  @param theLtransI Length of incident transition part
11832         #  @param theLthinI Length of incident thin part
11833         #
11834         #  @param theName Object name; when specified, this parameter is used
11835         #         for result publication in the study. Otherwise, if automatic
11836         #         publication is switched on, default value is used for result name.
11837         #
11838         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11839         #
11840         #  @ref tui_creation_pipetshape "Example"
11841         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11842                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11843                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11844                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11845                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11846                             theName=None):
11847             """
11848             Create a T-shape object with specified caracteristics for the main
11849             and the incident pipes (radius, width, half-length).
11850             The extremities of the main pipe are located on junctions points P1 and P2.
11851             The extremity of the incident pipe is located on junction point P3.
11852             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11853             the main plane of the T-shape is XOY.
11854
11855             Parameters:
11856                 theR1 Internal radius of main pipe
11857                 theW1 Width of main pipe
11858                 theL1 Half-length of main pipe
11859                 theR2 Internal radius of incident pipe (R2 < R1)
11860                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11861                 theL2 Half-length of incident pipe
11862                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11863                 theP1 1st junction point of main pipe
11864                 theP2 2nd junction point of main pipe
11865                 theP3 Junction point of incident pipe
11866
11867                 theRL Internal radius of left thickness reduction
11868                 theWL Width of left thickness reduction
11869                 theLtransL Length of left transition part
11870                 theLthinL Length of left thin part
11871
11872                 theRR Internal radius of right thickness reduction
11873                 theWR Width of right thickness reduction
11874                 theLtransR Length of right transition part
11875                 theLthinR Length of right thin part
11876
11877                 theRI Internal radius of incident thickness reduction
11878                 theWI Width of incident thickness reduction
11879                 theLtransI Length of incident transition part
11880                 theLthinI Length of incident thin part
11881
11882                 theName Object name; when specified, this parameter is used
11883                         for result publication in the study. Otherwise, if automatic
11884                         publication is switched on, default value is used for result name.
11885
11886             Returns:
11887                 List of GEOM_Object, containing the created shape and propagation groups.
11888
11889             Example of usage:
11890                 # create PipeTShape object
11891                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11892                 # create PipeTShape object with position
11893                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11894                 # create PipeTShape object with left thickness reduction
11895                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11896             """
11897             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)
11898             if (theP1 and theP2 and theP3):
11899                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11900                                                                 theRL, theWL, theLtransL, theLthinL,
11901                                                                 theRR, theWR, theLtransR, theLthinR,
11902                                                                 theRI, theWI, theLtransI, theLthinI,
11903                                                                 theHexMesh, theP1, theP2, theP3)
11904             else:
11905                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
11906                                                     theRL, theWL, theLtransL, theLthinL,
11907                                                     theRR, theWR, theLtransR, theLthinR,
11908                                                     theRI, theWI, theLtransI, theLthinI,
11909                                                     theHexMesh)
11910             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11911             if Parameters: anObj[0].SetParameters(Parameters)
11912             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11913             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11914             return anObj
11915
11916         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11917         #  and the incident pipes (radius, width, half-length). The chamfer is
11918         #  created on the junction of the pipes.
11919         #  The extremities of the main pipe are located on junctions points P1 and P2.
11920         #  The extremity of the incident pipe is located on junction point P3.
11921         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11922         #  the main plane of the T-shape is XOY.
11923         #  @param theR1 Internal radius of main pipe
11924         #  @param theW1 Width of main pipe
11925         #  @param theL1 Half-length of main pipe
11926         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11927         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11928         #  @param theL2 Half-length of incident pipe
11929         #  @param theH Height of the chamfer.
11930         #  @param theW Width of the chamfer.
11931         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11932         #  @param theP1 1st junction point of main pipe
11933         #  @param theP2 2nd junction point of main pipe
11934         #  @param theP3 Junction point of incident pipe
11935         #
11936         #  @param theRL Internal radius of left thickness reduction
11937         #  @param theWL Width of left thickness reduction
11938         #  @param theLtransL Length of left transition part
11939         #  @param theLthinL Length of left thin part
11940         #
11941         #  @param theRR Internal radius of right thickness reduction
11942         #  @param theWR Width of right thickness reduction
11943         #  @param theLtransR Length of right transition part
11944         #  @param theLthinR Length of right thin part
11945         #
11946         #  @param theRI Internal radius of incident thickness reduction
11947         #  @param theWI Width of incident thickness reduction
11948         #  @param theLtransI Length of incident transition part
11949         #  @param theLthinI Length of incident thin part
11950         #
11951         #  @param theName Object name; when specified, this parameter is used
11952         #         for result publication in the study. Otherwise, if automatic
11953         #         publication is switched on, default value is used for result name.
11954         #
11955         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11956         #
11957         #  @ref tui_creation_pipetshape "Example"
11958         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
11959                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11960                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11961                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11962                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11963                                    theName=None):
11964             """
11965             Create a T-shape object with chamfer and with specified caracteristics for the main
11966             and the incident pipes (radius, width, half-length). The chamfer is
11967             created on the junction of the pipes.
11968             The extremities of the main pipe are located on junctions points P1 and P2.
11969             The extremity of the incident pipe is located on junction point P3.
11970             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11971             the main plane of the T-shape is XOY.
11972
11973             Parameters:
11974                 theR1 Internal radius of main pipe
11975                 theW1 Width of main pipe
11976                 theL1 Half-length of main pipe
11977                 theR2 Internal radius of incident pipe (R2 < R1)
11978                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11979                 theL2 Half-length of incident pipe
11980                 theH Height of the chamfer.
11981                 theW Width of the chamfer.
11982                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11983                 theP1 1st junction point of main pipe
11984                 theP2 2nd junction point of main pipe
11985                 theP3 Junction point of incident pipe
11986
11987                 theRL Internal radius of left thickness reduction
11988                 theWL Width of left thickness reduction
11989                 theLtransL Length of left transition part
11990                 theLthinL Length of left thin part
11991
11992                 theRR Internal radius of right thickness reduction
11993                 theWR Width of right thickness reduction
11994                 theLtransR Length of right transition part
11995                 theLthinR Length of right thin part
11996
11997                 theRI Internal radius of incident thickness reduction
11998                 theWI Width of incident thickness reduction
11999                 theLtransI Length of incident transition part
12000                 theLthinI Length of incident thin part
12001
12002                 theName Object name; when specified, this parameter is used
12003                         for result publication in the study. Otherwise, if automatic
12004                         publication is switched on, default value is used for result name.
12005
12006             Returns:
12007                 List of GEOM_Object, containing the created shape and propagation groups.
12008
12009             Example of usage:
12010                 # create PipeTShape with chamfer object
12011                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12012                 # create PipeTShape with chamfer object with position
12013                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12014                 # create PipeTShape with chamfer object with left thickness reduction
12015                 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)
12016             """
12017             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)
12018             if (theP1 and theP2 and theP3):
12019               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12020                                                                      theRL, theWL, theLtransL, theLthinL,
12021                                                                      theRR, theWR, theLtransR, theLthinR,
12022                                                                      theRI, theWI, theLtransI, theLthinI,
12023                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12024             else:
12025               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12026                                                          theRL, theWL, theLtransL, theLthinL,
12027                                                          theRR, theWR, theLtransR, theLthinR,
12028                                                          theRI, theWI, theLtransI, theLthinI,
12029                                                          theH, theW, theHexMesh)
12030             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12031             if Parameters: anObj[0].SetParameters(Parameters)
12032             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12033             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12034             return anObj
12035
12036         ## Create a T-shape object with fillet and with specified caracteristics for the main
12037         #  and the incident pipes (radius, width, half-length). The fillet is
12038         #  created on the junction of the pipes.
12039         #  The extremities of the main pipe are located on junctions points P1 and P2.
12040         #  The extremity of the incident pipe is located on junction point P3.
12041         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12042         #  the main plane of the T-shape is XOY.
12043         #  @param theR1 Internal radius of main pipe
12044         #  @param theW1 Width of main pipe
12045         #  @param theL1 Half-length of main pipe
12046         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12047         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12048         #  @param theL2 Half-length of incident pipe
12049         #  @param theRF Radius of curvature of fillet.
12050         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12051         #  @param theP1 1st junction point of main pipe
12052         #  @param theP2 2nd junction point of main pipe
12053         #  @param theP3 Junction point of incident pipe
12054         #
12055         #  @param theRL Internal radius of left thickness reduction
12056         #  @param theWL Width of left thickness reduction
12057         #  @param theLtransL Length of left transition part
12058         #  @param theLthinL Length of left thin part
12059         #
12060         #  @param theRR Internal radius of right thickness reduction
12061         #  @param theWR Width of right thickness reduction
12062         #  @param theLtransR Length of right transition part
12063         #  @param theLthinR Length of right thin part
12064         #
12065         #  @param theRI Internal radius of incident thickness reduction
12066         #  @param theWI Width of incident thickness reduction
12067         #  @param theLtransI Length of incident transition part
12068         #  @param theLthinI Length of incident thin part
12069         #
12070         #  @param theName Object name; when specified, this parameter is used
12071         #         for result publication in the study. Otherwise, if automatic
12072         #         publication is switched on, default value is used for result name.
12073         #
12074         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12075         #
12076         #  @ref tui_creation_pipetshape "Example"
12077         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12078                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12079                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12080                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12081                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12082                                   theName=None):
12083             """
12084             Create a T-shape object with fillet and with specified caracteristics for the main
12085             and the incident pipes (radius, width, half-length). The fillet is
12086             created on the junction of the pipes.
12087             The extremities of the main pipe are located on junctions points P1 and P2.
12088             The extremity of the incident pipe is located on junction point P3.
12089
12090             Parameters:
12091                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12092                 the main plane of the T-shape is XOY.
12093                 theR1 Internal radius of main pipe
12094                 theW1 Width of main pipe
12095                 heL1 Half-length of main pipe
12096                 theR2 Internal radius of incident pipe (R2 < R1)
12097                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12098                 theL2 Half-length of incident pipe
12099                 theRF Radius of curvature of fillet.
12100                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12101                 theP1 1st junction point of main pipe
12102                 theP2 2nd junction point of main pipe
12103                 theP3 Junction point of incident pipe
12104
12105                 theRL Internal radius of left thickness reduction
12106                 theWL Width of left thickness reduction
12107                 theLtransL Length of left transition part
12108                 theLthinL Length of left thin part
12109
12110                 theRR Internal radius of right thickness reduction
12111                 theWR Width of right thickness reduction
12112                 theLtransR Length of right transition part
12113                 theLthinR Length of right thin part
12114
12115                 theRI Internal radius of incident thickness reduction
12116                 theWI Width of incident thickness reduction
12117                 theLtransI Length of incident transition part
12118                 theLthinI Length of incident thin part
12119
12120                 theName Object name; when specified, this parameter is used
12121                         for result publication in the study. Otherwise, if automatic
12122                         publication is switched on, default value is used for result name.
12123                 
12124             Returns:
12125                 List of GEOM_Object, containing the created shape and propagation groups.
12126                 
12127             Example of usage:
12128                 # create PipeTShape with fillet object
12129                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12130                 # create PipeTShape with fillet object with position
12131                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12132                 # create PipeTShape with fillet object with left thickness reduction
12133                 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)
12134             """
12135             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)
12136             if (theP1 and theP2 and theP3):
12137               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12138                                                                     theRL, theWL, theLtransL, theLthinL,
12139                                                                     theRR, theWR, theLtransR, theLthinR,
12140                                                                     theRI, theWI, theLtransI, theLthinI,
12141                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12142             else:
12143               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12144                                                         theRL, theWL, theLtransL, theLthinL,
12145                                                         theRR, theWR, theLtransR, theLthinR,
12146                                                         theRI, theWI, theLtransI, theLthinI,
12147                                                         theRF, theHexMesh)
12148             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12149             if Parameters: anObj[0].SetParameters(Parameters)
12150             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12151             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12152             return anObj
12153
12154         ## This function allows creating a disk already divided into blocks. It
12155         #  can be used to create divided pipes for later meshing in hexaedra.
12156         #  @param theR Radius of the disk
12157         #  @param theOrientation Orientation of the plane on which the disk will be built
12158         #         1 = XOY, 2 = OYZ, 3 = OZX
12159         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12160         #  @param theName Object name; when specified, this parameter is used
12161         #         for result publication in the study. Otherwise, if automatic
12162         #         publication is switched on, default value is used for result name.
12163         #
12164         #  @return New GEOM_Object, containing the created shape.
12165         #
12166         #  @ref tui_creation_divideddisk "Example"
12167         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12168             """
12169             Creates a disk, divided into blocks. It can be used to create divided pipes
12170             for later meshing in hexaedra.
12171
12172             Parameters:
12173                 theR Radius of the disk
12174                 theOrientation Orientation of the plane on which the disk will be built:
12175                                1 = XOY, 2 = OYZ, 3 = OZX
12176                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12177                 theName Object name; when specified, this parameter is used
12178                         for result publication in the study. Otherwise, if automatic
12179                         publication is switched on, default value is used for result name.
12180
12181             Returns:
12182                 New GEOM_Object, containing the created shape.
12183             """
12184             theR, Parameters = ParseParameters(theR)
12185             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12186             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12187             if Parameters: anObj.SetParameters(Parameters)
12188             self._autoPublish(anObj, theName, "dividedDisk")
12189             return anObj
12190             
12191         ## This function allows creating a disk already divided into blocks. It
12192         #  can be used to create divided pipes for later meshing in hexaedra.
12193         #  @param theCenter Center of the disk
12194         #  @param theVector Normal vector to the plane of the created disk
12195         #  @param theRadius Radius of the disk
12196         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12197         #  @param 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         #  @return New GEOM_Object, containing the created shape.
12202         #
12203         #  @ref tui_creation_divideddisk "Example"
12204         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12205             """
12206             Creates a disk already divided into blocks. It can be used to create divided pipes
12207             for later meshing in hexaedra.
12208
12209             Parameters:
12210                 theCenter Center of the disk
12211                 theVector Normal vector to the plane of the created disk
12212                 theRadius Radius of the disk
12213                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12214                 theName Object name; when specified, this parameter is used
12215                         for result publication in the study. Otherwise, if automatic
12216                         publication is switched on, default value is used for result name.
12217
12218             Returns:
12219                 New GEOM_Object, containing the created shape.
12220             """
12221             theRadius, Parameters = ParseParameters(theRadius)
12222             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12223             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12224             if Parameters: anObj.SetParameters(Parameters)
12225             self._autoPublish(anObj, theName, "dividedDisk")
12226             return anObj
12227
12228         ## Builds a cylinder prepared for hexa meshes
12229         #  @param theR Radius of the cylinder
12230         #  @param theH Height of the cylinder
12231         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12232         #  @param theName Object name; when specified, this parameter is used
12233         #         for result publication in the study. Otherwise, if automatic
12234         #         publication is switched on, default value is used for result name.
12235         #
12236         #  @return New GEOM_Object, containing the created shape.
12237         #
12238         #  @ref tui_creation_dividedcylinder "Example"
12239         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12240             """
12241             Builds a cylinder prepared for hexa meshes
12242
12243             Parameters:
12244                 theR Radius of the cylinder
12245                 theH Height of the cylinder
12246                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12247                 theName Object name; when specified, this parameter is used
12248                         for result publication in the study. Otherwise, if automatic
12249                         publication is switched on, default value is used for result name.
12250
12251             Returns:
12252                 New GEOM_Object, containing the created shape.
12253             """
12254             theR, theH, Parameters = ParseParameters(theR, theH)
12255             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12256             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12257             if Parameters: anObj.SetParameters(Parameters)
12258             self._autoPublish(anObj, theName, "dividedCylinder")
12259             return anObj
12260
12261         ## Create a surface from a cloud of points
12262         #  @param thelPoints list of points
12263         #  @return New GEOM_Object, containing the created shape.
12264         #
12265         #  @ref tui_creation_smoothingsurface "Example"
12266         def MakeSmoothingSurface(self, thelPoints):
12267             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints)
12268             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12269             return anObj
12270
12271         #@@ insert new functions before this line @@ do not remove this line @@#
12272
12273         # end of l4_advanced
12274         ## @}
12275
12276         ## Create a copy of the given object
12277         #
12278         #  @param theOriginal geometry object for copy
12279         #  @param theName Object name; when specified, this parameter is used
12280         #         for result publication in the study. Otherwise, if automatic
12281         #         publication is switched on, default value is used for result name.
12282         #
12283         #  @return New GEOM_Object, containing the copied shape.
12284         #
12285         #  @ingroup l1_geomBuilder_auxiliary
12286         #  @ref swig_MakeCopy "Example"
12287         def MakeCopy(self, theOriginal, theName=None):
12288             """
12289             Create a copy of the given object
12290
12291             Parameters:
12292                 theOriginal geometry object for copy
12293                 theName Object name; when specified, this parameter is used
12294                         for result publication in the study. Otherwise, if automatic
12295                         publication is switched on, default value is used for result name.
12296
12297             Returns:
12298                 New GEOM_Object, containing the copied shape.
12299
12300             Example of usage: Copy = geompy.MakeCopy(Box)
12301             """
12302             # Example: see GEOM_TestAll.py
12303             anObj = self.InsertOp.MakeCopy(theOriginal)
12304             RaiseIfFailed("MakeCopy", self.InsertOp)
12305             self._autoPublish(anObj, theName, "copy")
12306             return anObj
12307
12308         ## Add Path to load python scripts from
12309         #  @param Path a path to load python scripts from
12310         #  @ingroup l1_geomBuilder_auxiliary
12311         def addPath(self,Path):
12312             """
12313             Add Path to load python scripts from
12314
12315             Parameters:
12316                 Path a path to load python scripts from
12317             """
12318             if (sys.path.count(Path) < 1):
12319                 sys.path.append(Path)
12320                 pass
12321             pass
12322
12323         ## Load marker texture from the file
12324         #  @param Path a path to the texture file
12325         #  @return unique texture identifier
12326         #  @ingroup l1_geomBuilder_auxiliary
12327         def LoadTexture(self, Path):
12328             """
12329             Load marker texture from the file
12330             
12331             Parameters:
12332                 Path a path to the texture file
12333                 
12334             Returns:
12335                 unique texture identifier
12336             """
12337             # Example: see GEOM_TestAll.py
12338             ID = self.InsertOp.LoadTexture(Path)
12339             RaiseIfFailed("LoadTexture", self.InsertOp)
12340             return ID
12341
12342         ## Get internal name of the object based on its study entry
12343         #  @note This method does not provide an unique identifier of the geometry object.
12344         #  @note This is internal function of GEOM component, though it can be used outside it for 
12345         #  appropriate reason (e.g. for identification of geometry object).
12346         #  @param obj geometry object
12347         #  @return unique object identifier
12348         #  @ingroup l1_geomBuilder_auxiliary
12349         def getObjectID(self, obj):
12350             """
12351             Get internal name of the object based on its study entry.
12352             Note: this method does not provide an unique identifier of the geometry object.
12353             It is an internal function of GEOM component, though it can be used outside GEOM for 
12354             appropriate reason (e.g. for identification of geometry object).
12355
12356             Parameters:
12357                 obj geometry object
12358
12359             Returns:
12360                 unique object identifier
12361             """
12362             ID = ""
12363             entry = salome.ObjectToID(obj)
12364             if entry is not None:
12365                 lst = entry.split(":")
12366                 if len(lst) > 0:
12367                     ID = lst[-1] # -1 means last item in the list            
12368                     return "GEOM_" + ID
12369             return ID
12370                 
12371             
12372
12373         ## Add marker texture. @a Width and @a Height parameters
12374         #  specify width and height of the texture in pixels.
12375         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12376         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12377         #  parameter should be unpacked string, in which '1' symbols represent opaque
12378         #  pixels and '0' represent transparent pixels of the texture bitmap.
12379         #
12380         #  @param Width texture width in pixels
12381         #  @param Height texture height in pixels
12382         #  @param Texture texture data
12383         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12384         #  @return unique texture identifier
12385         #  @ingroup l1_geomBuilder_auxiliary
12386         def AddTexture(self, Width, Height, Texture, RowData=False):
12387             """
12388             Add marker texture. Width and Height parameters
12389             specify width and height of the texture in pixels.
12390             If RowData is True, Texture parameter should represent texture data
12391             packed into the byte array. If RowData is False (default), Texture
12392             parameter should be unpacked string, in which '1' symbols represent opaque
12393             pixels and '0' represent transparent pixels of the texture bitmap.
12394
12395             Parameters:
12396                 Width texture width in pixels
12397                 Height texture height in pixels
12398                 Texture texture data
12399                 RowData if True, Texture data are packed in the byte stream
12400
12401             Returns:
12402                 return unique texture identifier
12403             """
12404             if not RowData: Texture = PackData(Texture)
12405             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12406             RaiseIfFailed("AddTexture", self.InsertOp)
12407             return ID
12408
12409         ## Creates a new folder object. It is a container for any GEOM objects.
12410         #  @param Name name of the container
12411         #  @param Father parent object. If None, 
12412         #         folder under 'Geometry' root object will be created.
12413         #  @return a new created folder
12414         def NewFolder(self, Name, Father=None):
12415             """
12416             Create a new folder object. It is an auxiliary container for any GEOM objects.
12417             
12418             Parameters:
12419                 Name name of the container
12420                 Father parent object. If None, 
12421                 folder under 'Geometry' root object will be created.
12422             
12423             Returns:
12424                 a new created folder
12425             """
12426             if not Father: Father = self.father
12427             return self.CreateFolder(Name, Father)
12428
12429         ## Move object to the specified folder
12430         #  @param Object object to move
12431         #  @param Folder target folder
12432         def PutToFolder(self, Object, Folder):
12433             """
12434             Move object to the specified folder
12435             
12436             Parameters:
12437                 Object object to move
12438                 Folder target folder
12439             """
12440             self.MoveToFolder(Object, Folder)
12441             pass
12442
12443         ## Move list of objects to the specified folder
12444         #  @param ListOfSO list of objects to move
12445         #  @param Folder target folder
12446         def PutListToFolder(self, ListOfSO, Folder):
12447             """
12448             Move list of objects to the specified folder
12449             
12450             Parameters:
12451                 ListOfSO list of objects to move
12452                 Folder target folder
12453             """
12454             self.MoveListToFolder(ListOfSO, Folder)
12455             pass
12456
12457 import omniORB
12458 # Register the new proxy for GEOM_Gen
12459 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12460
12461 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12462 #  interface to GEOM operations.
12463 #
12464 #  Typical use is:
12465 #  \code
12466 #    import salome
12467 #    salome.salome_init()
12468 #    from salome.geom import geomBuilder
12469 #    geompy = geomBuilder.New(salome.myStudy)
12470 #  \endcode
12471 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12472 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12473 #  @return geomBuilder instance
12474 def New( study, instance=None):
12475     """
12476     Create a new geomBuilder instance.The geomBuilder class provides the Python
12477     interface to GEOM operations.
12478
12479     Typical use is:
12480         import salome
12481         salome.salome_init()
12482         from salome.geom import geomBuilder
12483         geompy = geomBuilder.New(salome.myStudy)
12484
12485     Parameters:
12486         study     SALOME study, generally obtained by salome.myStudy.
12487         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12488     Returns:
12489         geomBuilder instance
12490     """
12491     #print "New geomBuilder ", study, instance
12492     global engine
12493     global geom
12494     global doLcc
12495     engine = instance
12496     if engine is None:
12497       doLcc = True
12498     geom = geomBuilder()
12499     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12500     geom.init_geom(study)
12501     return geom