Salome HOME
a0d60cb5fe7c2b117628fada042ecef7454f8e25
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup l1_publish_data Publishing results in SALOME study
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ## 
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ## 
50 ## For example, consider the following Python script:
51 ## 
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ## 
60 ## Last two lines can be replaced by one-line instruction:
61 ## 
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ## 
66 ## ... or simply
67 ## 
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ## 
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter 
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) 
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Not that some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## @}
148
149
150 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
151
152 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
153 ## @{
154 ##   @defgroup l2_import_export Importing/exporting geometrical objects
155 ##   @defgroup l2_creating      Creating geometrical objects
156 ##   @{
157 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
158 ##     @{
159 ##       @defgroup l4_curves        Creating Curves
160
161 ##     @}
162 ##     @defgroup l3_3d_primitives Creating 3D Primitives
163 ##     @defgroup l3_complex       Creating Complex Objects
164 ##     @defgroup l3_groups        Working with groups
165 ##     @defgroup l3_blocks        Building by blocks
166 ##     @{
167 ##       @defgroup l4_blocks_measure Check and Improve
168
169 ##     @}
170 ##     @defgroup l3_sketcher      Sketcher
171 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
172 ##     @{
173 ##       @defgroup l4_decompose     Decompose objects
174 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
175 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
176 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
177 ##       @defgroup l4_advanced      Advanced objects creation functions
178
179 ##     @}
180
181 ##   @}
182 ##   @defgroup l2_transforming  Transforming geometrical objects
183 ##   @{
184 ##     @defgroup l3_basic_op      Basic Operations
185 ##     @defgroup l3_boolean       Boolean Operations
186 ##     @defgroup l3_transform     Transformation Operations
187 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
188 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
189 ##     @defgroup l3_blocks_op     Blocks Operations
190 ##     @defgroup l3_healing       Repairing Operations
191 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
192
193 ##   @}
194 ##   @defgroup l2_measure       Using measurement tools
195 ##   @defgroup l2_field         Field on Geometry
196
197 ## @}
198
199 # initialize SALOME session in try/except block
200 # to avoid problems in some cases, e.g. when generating documentation
201 try:
202     import salome
203     salome.salome_init()
204     from salome import *
205 except:
206     pass
207
208 from salome_notebook import *
209
210 import GEOM
211 import math
212 import os
213
214 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
215
216 # service function
217 def _toListOfNames(_names, _size=-1):
218     l = []
219     import types
220     if type(_names) in [types.ListType, types.TupleType]:
221         for i in _names: l.append(i)
222     elif _names:
223         l.append(_names)
224     if l and len(l) < _size:
225         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
226     return l
227
228 ## Raise an Error, containing the Method_name, if Operation is Failed
229 ## @ingroup l1_geomBuilder_auxiliary
230 def RaiseIfFailed (Method_name, Operation):
231     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
232         Operation.AbortOperation()
233         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
234     else:
235         Operation.FinishOperation()
236         pass
237
238 ## Return list of variables value from salome notebook
239 ## @ingroup l1_geomBuilder_auxiliary
240 def ParseParameters(*parameters):
241     Result = []
242     StringResult = []
243     for parameter in parameters:
244         if isinstance(parameter, list):
245             lResults = ParseParameters(*parameter)
246             if len(lResults) > 0:
247                 Result.append(lResults[:-1])
248                 StringResult += lResults[-1].split(":")
249                 pass
250             pass
251         else:
252             if isinstance(parameter,str):
253                 if notebook.isVariable(parameter):
254                     Result.append(notebook.get(parameter))
255                 else:
256                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
257                 pass
258             else:
259                 Result.append(parameter)
260                 pass
261             StringResult.append(str(parameter))
262             pass
263         pass
264     if Result:
265         Result.append(":".join(StringResult))
266     else:
267         Result = ":".join(StringResult)
268     return Result
269
270 ## Return list of variables value from salome notebook
271 ## @ingroup l1_geomBuilder_auxiliary
272 def ParseList(list):
273     Result = []
274     StringResult = ""
275     for parameter in list:
276         if isinstance(parameter,str) and notebook.isVariable(parameter):
277             Result.append(str(notebook.get(parameter)))
278             pass
279         else:
280             Result.append(str(parameter))
281             pass
282
283         StringResult = StringResult + str(parameter)
284         StringResult = StringResult + ":"
285         pass
286     StringResult = StringResult[:len(StringResult)-1]
287     return Result, StringResult
288
289 ## Return list of variables value from salome notebook
290 ## @ingroup l1_geomBuilder_auxiliary
291 def ParseSketcherCommand(command):
292     Result = ""
293     StringResult = ""
294     sections = command.split(":")
295     for section in sections:
296         parameters = section.split(" ")
297         paramIndex = 1
298         for parameter in parameters:
299             if paramIndex > 1 and parameter.find("'") != -1:
300                 parameter = parameter.replace("'","")
301                 if notebook.isVariable(parameter):
302                     Result = Result + str(notebook.get(parameter)) + " "
303                     pass
304                 else:
305                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
306                     pass
307                 pass
308             else:
309                 Result = Result + str(parameter) + " "
310                 pass
311             if paramIndex > 1:
312                 StringResult = StringResult + parameter
313                 StringResult = StringResult + ":"
314                 pass
315             paramIndex = paramIndex + 1
316             pass
317         Result = Result[:len(Result)-1] + ":"
318         pass
319     Result = Result[:len(Result)-1]
320     return Result, StringResult
321
322 ## Helper function which can be used to pack the passed string to the byte data.
323 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
324 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
325 ## For example,
326 ## \code
327 ## val = PackData("10001110") # val = 0xAE
328 ## val = PackData("1")        # val = 0x80
329 ## \endcode
330 ## @param data unpacked data - a string containing '1' and '0' symbols
331 ## @return data packed to the byte stream
332 ## @ingroup l1_geomBuilder_auxiliary
333 def PackData(data):
334     """
335     Helper function which can be used to pack the passed string to the byte data.
336     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
337     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
338
339     Parameters:
340         data unpacked data - a string containing '1' and '0' symbols
341
342     Returns:
343         data packed to the byte stream
344         
345     Example of usage:
346         val = PackData("10001110") # val = 0xAE
347         val = PackData("1")        # val = 0x80
348     """
349     bytes = len(data)/8
350     if len(data)%8: bytes += 1
351     res = ""
352     for b in range(bytes):
353         d = data[b*8:(b+1)*8]
354         val = 0
355         for i in range(8):
356             val *= 2
357             if i < len(d):
358                 if d[i] == "1": val += 1
359                 elif d[i] != "0":
360                     raise "Invalid symbol %s" % d[i]
361                 pass
362             pass
363         res += chr(val)
364         pass
365     return res
366
367 ## Read bitmap texture from the text file.
368 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
369 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
370 ## The function returns width and height of the pixmap in pixels and byte stream representing
371 ## texture bitmap itself.
372 ##
373 ## This function can be used to read the texture to the byte stream in order to pass it to
374 ## the AddTexture() function of geomBuilder class.
375 ## For example,
376 ## \code
377 ## from salome.geom import geomBuilder
378 ## geompy = geomBuilder.New(salome.myStudy)
379 ## texture = geompy.readtexture('mytexture.dat')
380 ## texture = geompy.AddTexture(*texture)
381 ## obj.SetMarkerTexture(texture)
382 ## \endcode
383 ## @param fname texture file name
384 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
385 ## @ingroup l1_geomBuilder_auxiliary
386 def ReadTexture(fname):
387     """
388     Read bitmap texture from the text file.
389     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
390     A zero symbol ('0') represents transparent pixel of the texture bitmap.
391     The function returns width and height of the pixmap in pixels and byte stream representing
392     texture bitmap itself.
393     This function can be used to read the texture to the byte stream in order to pass it to
394     the AddTexture() function of geomBuilder class.
395     
396     Parameters:
397         fname texture file name
398
399     Returns:
400         sequence of tree values: texture's width, height in pixels and its byte stream
401     
402     Example of usage:
403         from salome.geom import geomBuilder
404         geompy = geomBuilder.New(salome.myStudy)
405         texture = geompy.readtexture('mytexture.dat')
406         texture = geompy.AddTexture(*texture)
407         obj.SetMarkerTexture(texture)
408     """
409     try:
410         f = open(fname)
411         lines = [ l.strip() for l in f.readlines()]
412         f.close()
413         maxlen = 0
414         if lines: maxlen = max([len(x) for x in lines])
415         lenbytes = maxlen/8
416         if maxlen%8: lenbytes += 1
417         bytedata=""
418         for line in lines:
419             if len(line)%8:
420                 lenline = (len(line)/8+1)*8
421                 pass
422             else:
423                 lenline = (len(line)/8)*8
424                 pass
425             for i in range(lenline/8):
426                 byte=""
427                 for j in range(8):
428                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
429                     else: byte += "0"
430                     pass
431                 bytedata += PackData(byte)
432                 pass
433             for i in range(lenline/8, lenbytes):
434                 bytedata += PackData("0")
435             pass
436         return lenbytes*8, len(lines), bytedata
437     except:
438         pass
439     return 0, 0, ""
440
441 ## Returns a long value from enumeration type
442 #  Can be used for CORBA enumerator types like GEOM.shape_type
443 #  @param theItem enumeration type
444 #  @ingroup l1_geomBuilder_auxiliary
445 def EnumToLong(theItem):
446     """
447     Returns a long value from enumeration type
448     Can be used for CORBA enumerator types like geomBuilder.ShapeType
449
450     Parameters:
451         theItem enumeration type
452     """
453     ret = theItem
454     if hasattr(theItem, "_v"): ret = theItem._v
455     return ret
456
457 ## Information about closed/unclosed state of shell or wire
458 #  @ingroup l1_geomBuilder_auxiliary
459 class info:
460     """
461     Information about closed/unclosed state of shell or wire
462     """
463     UNKNOWN  = 0
464     CLOSED   = 1
465     UNCLOSED = 2
466
467 ##! Private class used to bind calls of plugin operations to geomBuilder
468 class PluginOperation:
469   def __init__(self, operation, function):
470     self.operation = operation
471     self.function = function
472     pass
473
474   def __call__(self, *args):
475     res = self.function(self.operation, *args)
476     RaiseIfFailed(self.function.__name__, self.operation)
477     return res
478
479 # Warning: geom is a singleton
480 geom = None
481 engine = None
482 doLcc = False
483 created = False
484
485 class geomBuilder(object, GEOM._objref_GEOM_Gen):
486
487         ## Enumeration ShapeType as a dictionary. \n
488         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
489         #  @ingroup l1_geomBuilder_auxiliary
490         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
491
492         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
493         #  and a list of parameters, describing the shape.
494         #  List of parameters, describing the shape:
495         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
496         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
497         #
498         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
499         #
500         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
501         #
502         #  - SPHERE:       [xc yc zc            R]
503         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
504         #  - BOX:          [xc yc zc                      ax ay az]
505         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
506         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
507         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
508         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
509         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
510         #
511         #  - SPHERE2D:     [xc yc zc            R]
512         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
513         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
514         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
515         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
516         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
517         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
518         #  - PLANE:        [xo yo zo  dx dy dz]
519         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
520         #  - FACE:                                       [nb_edges  nb_vertices]
521         #
522         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
523         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
524         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
525         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
526         #  - LINE:         [xo yo zo  dx dy dz]
527         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
528         #  - EDGE:                                                 [nb_vertices]
529         #
530         #  - VERTEX:       [x  y  z]
531         #  @ingroup l1_geomBuilder_auxiliary
532         kind = GEOM.GEOM_IKindOfShape
533
534         def __new__(cls):
535             global engine
536             global geom
537             global doLcc
538             global created
539             #print "==== __new__ ", engine, geom, doLcc, created
540             if geom is None:
541                 # geom engine is either retrieved from engine, or created
542                 geom = engine
543                 # Following test avoids a recursive loop
544                 if doLcc:
545                     if geom is not None:
546                         # geom engine not created: existing engine found
547                         doLcc = False
548                     if doLcc and not created:
549                         doLcc = False
550                         # FindOrLoadComponent called:
551                         # 1. CORBA resolution of server
552                         # 2. the __new__ method is called again
553                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
554                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
555                         #print "====1 ",geom
556                 else:
557                     # FindOrLoadComponent not called
558                     if geom is None:
559                         # geomBuilder instance is created from lcc.FindOrLoadComponent
560                         #print "==== super ", engine, geom, doLcc, created
561                         geom = super(geomBuilder,cls).__new__(cls)
562                         #print "====2 ",geom
563                     else:
564                         # geom engine not created: existing engine found
565                         #print "==== existing ", engine, geom, doLcc, created
566                         pass
567                 #print "return geom 1 ", geom
568                 return geom
569
570             #print "return geom 2 ", geom
571             return geom
572
573         def __init__(self):
574             global created
575             #print "-------- geomBuilder __init__ --- ", created, self
576             if not created:
577               created = True
578               GEOM._objref_GEOM_Gen.__init__(self)
579               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
580               self.myBuilder = None
581               self.myStudyId = 0
582               self.father    = None
583
584               self.BasicOp  = None
585               self.CurvesOp = None
586               self.PrimOp   = None
587               self.ShapesOp = None
588               self.HealOp   = None
589               self.InsertOp = None
590               self.BoolOp   = None
591               self.TrsfOp   = None
592               self.LocalOp  = None
593               self.MeasuOp  = None
594               self.BlocksOp = None
595               self.GroupOp  = None
596               self.AdvOp    = None
597               self.FieldOp  = None
598             pass
599
600         ## Process object publication in the study, as follows:
601         #  - if @a theName is specified (not None), the object is published in the study
602         #    with this name, not taking into account "auto-publishing" option;
603         #  - if @a theName is NOT specified, the object is published in the study
604         #    (using default name, which can be customized using @a theDefaultName parameter)
605         #    only if auto-publishing is switched on.
606         #
607         #  @param theObj  object, a subject for publishing
608         #  @param theName object name for study
609         #  @param theDefaultName default name for the auto-publishing
610         #
611         #  @sa addToStudyAuto()
612         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
613             # ---
614             def _item_name(_names, _defname, _idx=-1):
615                 if not _names: _names = _defname
616                 if type(_names) in [types.ListType, types.TupleType]:
617                     if _idx >= 0:
618                         if _idx >= len(_names) or not _names[_idx]:
619                             if type(_defname) not in [types.ListType, types.TupleType]:
620                                 _name = "%s_%d"%(_defname, _idx+1)
621                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
622                                 _name = _defname[_idx]
623                             else:
624                                 _name = "%noname_%d"%(dn, _idx+1)
625                             pass
626                         else:
627                             _name = _names[_idx]
628                         pass
629                     else:
630                         # must be wrong  usage
631                         _name = _names[0]
632                     pass
633                 else:
634                     if _idx >= 0:
635                         _name = "%s_%d"%(_names, _idx+1)
636                     else:
637                         _name = _names
638                     pass
639                 return _name
640             # ---
641             def _publish( _name, _obj ):
642                 fatherObj = None
643                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
644                     fatherObj = _obj.GetShape()
645                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
646                     fatherObj = _obj.GetField()
647                 elif not _obj.IsMainShape():
648                     fatherObj = _obj.GetMainShape()
649                     pass
650                 if fatherObj and fatherObj.GetStudyEntry():
651                     self.addToStudyInFather(fatherObj, _obj, _name)
652                 else:
653                     self.addToStudy(_obj, _name)
654                     pass
655                 return
656             # ---
657             if not theObj:
658                 return # null object
659             if not theName and not self.myMaxNbSubShapesAllowed:
660                 return # nothing to do: auto-publishing is disabled
661             if not theName and not theDefaultName:
662                 return # neither theName nor theDefaultName is given
663             import types
664             if type(theObj) in [types.ListType, types.TupleType]:
665                 # list of objects is being published
666                 idx = 0
667                 for obj in theObj:
668                     if not obj: continue # bad object
669                     name = _item_name(theName, theDefaultName, idx)
670                     _publish( name, obj )
671                     idx = idx+1
672                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
673                     pass
674                 pass
675             else:
676                 # single object is published
677                 name = _item_name(theName, theDefaultName)
678                 _publish( name, theObj )
679             pass
680
681         ## @addtogroup l1_geomBuilder_auxiliary
682         ## @{
683         def init_geom(self,theStudy):
684             self.myStudy = theStudy
685             self.myStudyId = self.myStudy._get_StudyId()
686             self.myBuilder = self.myStudy.NewBuilder()
687             self.father = self.myStudy.FindComponent("GEOM")
688             if self.father is None:
689                 self.father = self.myBuilder.NewComponent("GEOM")
690                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
691                 FName = A1._narrow(SALOMEDS.AttributeName)
692                 FName.SetValue("Geometry")
693                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
694                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
695                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
696                 self.myBuilder.DefineComponentInstance(self.father,self)
697                 pass
698             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
699             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
700             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
701             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
702             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
703             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
704             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
705             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
706             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
707             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
708             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
709             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
710             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
711
712             # The below line is a right way to map all plugin functions to geomBuilder,
713             # but AdvancedOperations are already mapped, that is why this line is commented
714             # and presents here only as an axample
715             #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
716
717             # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
718             self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
719
720             # set GEOM as root in the use case tree
721             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
722             self.myUseCaseBuilder.SetRootCurrent()
723             self.myUseCaseBuilder.Append(self.father)
724             pass
725
726         def GetPluginOperations(self, studyID, libraryName):
727             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
728             if op:
729                 # bind methods of operations to self
730                 methods = op.__class__.__dict__['__methods__']
731                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
732                 for meth_name in methods:
733                     if not meth_name in avoid_methods: # avoid basic methods
734                         function = getattr(op.__class__, meth_name)
735                         if callable(function):
736                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
737                             self.__dict__[meth_name] = PluginOperation(op, function)
738             return op
739
740         ## Enable / disable results auto-publishing
741         # 
742         #  The automatic publishing is managed in the following way:
743         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
744         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
745         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
746         #  value passed as parameter has the same effect.
747         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
748         #  maximum number of sub-shapes allowed for publishing is set to specified value.
749         #
750         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
751         #  @ingroup l1_publish_data
752         def addToStudyAuto(self, maxNbSubShapes=-1):
753             """
754             Enable / disable results auto-publishing
755
756             The automatic publishing is managed in the following way:
757             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
758             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
759             maximum number of sub-shapes allowed for publishing is unlimited; any negative
760             value passed as parameter has the same effect.
761             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
762             maximum number of sub-shapes allowed for publishing is set to this value.
763
764             Parameters:
765                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
766
767             Example of usage:
768                 geompy.addToStudyAuto()   # enable auto-publishing
769                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
770                 geompy.addToStudyAuto(0)  # disable auto-publishing
771             """
772             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
773             pass
774
775         ## Dump component to the Python script
776         #  This method overrides IDL function to allow default values for the parameters.
777         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
778             """
779             Dump component to the Python script
780             This method overrides IDL function to allow default values for the parameters.
781             """
782             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
783
784         ## Get name for sub-shape aSubObj of shape aMainObj
785         #
786         # @ref swig_SubShapeName "Example"
787         def SubShapeName(self,aSubObj, aMainObj):
788             """
789             Get name for sub-shape aSubObj of shape aMainObj
790             """
791             # Example: see GEOM_TestAll.py
792
793             #aSubId  = orb.object_to_string(aSubObj)
794             #aMainId = orb.object_to_string(aMainObj)
795             #index = gg.getIndexTopology(aSubId, aMainId)
796             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
797             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
798             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
799             return name
800
801         ## Publish in study aShape with name aName
802         #
803         #  \param aShape the shape to be published
804         #  \param aName  the name for the shape
805         #  \param doRestoreSubShapes if True, finds and publishes also
806         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
807         #         and published sub-shapes of arguments
808         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
809         #                                                  these arguments description
810         #  \return study entry of the published shape in form of string
811         #
812         #  @ingroup l1_publish_data
813         #  @ref swig_all_addtostudy "Example"
814         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
815                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
816             """
817             Publish in study aShape with name aName
818
819             Parameters:
820                 aShape the shape to be published
821                 aName  the name for the shape
822                 doRestoreSubShapes if True, finds and publishes also
823                                    sub-shapes of aShape, corresponding to its arguments
824                                    and published sub-shapes of arguments
825                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
826                                                          these arguments description
827
828             Returns:
829                 study entry of the published shape in form of string
830
831             Example of usage:
832                 id_block1 = geompy.addToStudy(Block1, "Block 1")
833             """
834             # Example: see GEOM_TestAll.py
835             try:
836                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
837                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
838                 if doRestoreSubShapes:
839                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
840                                             theFindMethod, theInheritFirstArg, True )
841             except:
842                 print "addToStudy() failed"
843                 return ""
844             return aShape.GetStudyEntry()
845
846         ## Publish in study aShape with name aName as sub-object of previously published aFather
847         #  \param aFather previously published object
848         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
849         #  \param aName  the name for the shape
850         #
851         #  \return study entry of the published shape in form of string
852         #
853         #  @ingroup l1_publish_data
854         #  @ref swig_all_addtostudyInFather "Example"
855         def addToStudyInFather(self, aFather, aShape, aName):
856             """
857             Publish in study aShape with name aName as sub-object of previously published aFather
858
859             Parameters:
860                 aFather previously published object
861                 aShape the shape to be published as sub-object of aFather
862                 aName  the name for the shape
863
864             Returns:
865                 study entry of the published shape in form of string
866             """
867             # Example: see GEOM_TestAll.py
868             try:
869                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
870                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
871             except:
872                 print "addToStudyInFather() failed"
873                 return ""
874             return aShape.GetStudyEntry()
875
876         ## Unpublish object in study
877         #
878         #  \param obj the object to be unpublished
879         def hideInStudy(self, obj):
880             """
881             Unpublish object in study
882
883             Parameters:
884                 obj the object to be unpublished
885             """
886             ior = salome.orb.object_to_string(obj)
887             aSObject = self.myStudy.FindObjectIOR(ior)
888             if aSObject is not None:
889                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
890                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
891                 drwAttribute.SetDrawable(False)
892                 pass
893
894         # end of l1_geomBuilder_auxiliary
895         ## @}
896
897         ## @addtogroup l3_restore_ss
898         ## @{
899
900         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
901         #  To be used from python scripts out of addToStudy() (non-default usage)
902         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
903         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
904         #                   If this list is empty, all operation arguments will be published
905         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
906         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
907         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
908         #                            Do not publish sub-shapes in place of arguments, but only
909         #                            in place of sub-shapes of the first argument,
910         #                            because the whole shape corresponds to the first argument.
911         #                            Mainly to be used after transformations, but it also can be
912         #                            usefull after partition with one object shape, and some other
913         #                            operations, where only the first argument has to be considered.
914         #                            If theObject has only one argument shape, this flag is automatically
915         #                            considered as True, not regarding really passed value.
916         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
917         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
918         #  \return list of published sub-shapes
919         #
920         #  @ref tui_restore_prs_params "Example"
921         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
922                               theInheritFirstArg=False, theAddPrefix=True):
923             """
924             Publish sub-shapes, standing for arguments and sub-shapes of arguments
925             To be used from python scripts out of geompy.addToStudy (non-default usage)
926
927             Parameters:
928                 theObject published GEOM.GEOM_Object, arguments of which will be published
929                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
930                           If this list is empty, all operation arguments will be published
931                 theFindMethod method to search sub-shapes, corresponding to arguments and
932                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
933                 theInheritFirstArg set properties of the first argument for theObject.
934                                    Do not publish sub-shapes in place of arguments, but only
935                                    in place of sub-shapes of the first argument,
936                                    because the whole shape corresponds to the first argument.
937                                    Mainly to be used after transformations, but it also can be
938                                    usefull after partition with one object shape, and some other
939                                    operations, where only the first argument has to be considered.
940                                    If theObject has only one argument shape, this flag is automatically
941                                    considered as True, not regarding really passed value.
942                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
943                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
944             Returns:
945                 list of published sub-shapes
946             """
947             # Example: see GEOM_TestAll.py
948             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
949                                           theFindMethod, theInheritFirstArg, theAddPrefix)
950
951         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
952         #  To be used from python scripts out of addToStudy() (non-default usage)
953         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
954         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
955         #                   If this list is empty, all operation arguments will be published
956         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
957         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
958         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
959         #                            Do not publish sub-shapes in place of arguments, but only
960         #                            in place of sub-shapes of the first argument,
961         #                            because the whole shape corresponds to the first argument.
962         #                            Mainly to be used after transformations, but it also can be
963         #                            usefull after partition with one object shape, and some other
964         #                            operations, where only the first argument has to be considered.
965         #                            If theObject has only one argument shape, this flag is automatically
966         #                            considered as True, not regarding really passed value.
967         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
968         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
969         #  \return list of published sub-shapes
970         #
971         #  @ref tui_restore_prs_params "Example"
972         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
973                                    theInheritFirstArg=False, theAddPrefix=True):
974             """
975             Publish sub-shapes, standing for arguments and sub-shapes of arguments
976             To be used from python scripts out of geompy.addToStudy() (non-default usage)
977
978             Parameters:
979                 theObject published GEOM.GEOM_Object, arguments of which will be published
980                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
981                           If this list is empty, all operation arguments will be published
982                 theFindMethod method to search sub-shapes, corresponding to arguments and
983                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
984                 theInheritFirstArg set properties of the first argument for theObject.
985                                    Do not publish sub-shapes in place of arguments, but only
986                                    in place of sub-shapes of the first argument,
987                                    because the whole shape corresponds to the first argument.
988                                    Mainly to be used after transformations, but it also can be
989                                    usefull after partition with one object shape, and some other
990                                    operations, where only the first argument has to be considered.
991                                    If theObject has only one argument shape, this flag is automatically
992                                    considered as True, not regarding really passed value.
993                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
994                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
995
996             Returns: 
997                 list of published sub-shapes
998             """
999             # Example: see GEOM_TestAll.py
1000             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1001                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1002
1003         # end of l3_restore_ss
1004         ## @}
1005
1006         ## @addtogroup l3_basic_go
1007         ## @{
1008
1009         ## Create point by three coordinates.
1010         #  @param theX The X coordinate of the point.
1011         #  @param theY The Y coordinate of the point.
1012         #  @param theZ The Z coordinate of the point.
1013         #  @param theName Object name; when specified, this parameter is used
1014         #         for result publication in the study. Otherwise, if automatic
1015         #         publication is switched on, default value is used for result name.
1016         #
1017         #  @return New GEOM.GEOM_Object, containing the created point.
1018         #
1019         #  @ref tui_creation_point "Example"
1020         def MakeVertex(self, theX, theY, theZ, theName=None):
1021             """
1022             Create point by three coordinates.
1023
1024             Parameters:
1025                 theX The X coordinate of the point.
1026                 theY The Y coordinate of the point.
1027                 theZ The Z coordinate of the point.
1028                 theName Object name; when specified, this parameter is used
1029                         for result publication in the study. Otherwise, if automatic
1030                         publication is switched on, default value is used for result name.
1031                 
1032             Returns: 
1033                 New GEOM.GEOM_Object, containing the created point.
1034             """
1035             # Example: see GEOM_TestAll.py
1036             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1037             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1038             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1039             anObj.SetParameters(Parameters)
1040             self._autoPublish(anObj, theName, "vertex")
1041             return anObj
1042
1043         ## Create a point, distant from the referenced point
1044         #  on the given distances along the coordinate axes.
1045         #  @param theReference The referenced point.
1046         #  @param theX Displacement from the referenced point along OX axis.
1047         #  @param theY Displacement from the referenced point along OY axis.
1048         #  @param theZ Displacement from the referenced point along OZ axis.
1049         #  @param theName Object name; when specified, this parameter is used
1050         #         for result publication in the study. Otherwise, if automatic
1051         #         publication is switched on, default value is used for result name.
1052         #
1053         #  @return New GEOM.GEOM_Object, containing the created point.
1054         #
1055         #  @ref tui_creation_point "Example"
1056         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1057             """
1058             Create a point, distant from the referenced point
1059             on the given distances along the coordinate axes.
1060
1061             Parameters:
1062                 theReference The referenced point.
1063                 theX Displacement from the referenced point along OX axis.
1064                 theY Displacement from the referenced point along OY axis.
1065                 theZ Displacement from the referenced point along OZ axis.
1066                 theName Object name; when specified, this parameter is used
1067                         for result publication in the study. Otherwise, if automatic
1068                         publication is switched on, default value is used for result name.
1069
1070             Returns:
1071                 New GEOM.GEOM_Object, containing the created point.
1072             """
1073             # Example: see GEOM_TestAll.py
1074             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1075             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1076             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1077             anObj.SetParameters(Parameters)
1078             self._autoPublish(anObj, theName, "vertex")
1079             return anObj
1080
1081         ## Create a point, corresponding to the given parameter on the given curve.
1082         #  @param theRefCurve The referenced curve.
1083         #  @param theParameter Value of parameter on the referenced curve.
1084         #  @param theName Object name; when specified, this parameter is used
1085         #         for result publication in the study. Otherwise, if automatic
1086         #         publication is switched on, default value is used for result name.
1087         #
1088         #  @return New GEOM.GEOM_Object, containing the created point.
1089         #
1090         #  @ref tui_creation_point "Example"
1091         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1092             """
1093             Create a point, corresponding to the given parameter on the given curve.
1094
1095             Parameters:
1096                 theRefCurve The referenced curve.
1097                 theParameter Value of parameter on the referenced curve.
1098                 theName Object name; when specified, this parameter is used
1099                         for result publication in the study. Otherwise, if automatic
1100                         publication is switched on, default value is used for result name.
1101
1102             Returns:
1103                 New GEOM.GEOM_Object, containing the created point.
1104
1105             Example of usage:
1106                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1107             """
1108             # Example: see GEOM_TestAll.py
1109             theParameter, Parameters = ParseParameters(theParameter)
1110             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1111             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1112             anObj.SetParameters(Parameters)
1113             self._autoPublish(anObj, theName, "vertex")
1114             return anObj
1115
1116         ## Create a point by projection give coordinates on the given curve
1117         #  @param theRefCurve The referenced curve.
1118         #  @param theX X-coordinate in 3D space
1119         #  @param theY Y-coordinate in 3D space
1120         #  @param theZ Z-coordinate in 3D space
1121         #  @param theName Object name; when specified, this parameter is used
1122         #         for result publication in the study. Otherwise, if automatic
1123         #         publication is switched on, default value is used for result name.
1124         #
1125         #  @return New GEOM.GEOM_Object, containing the created point.
1126         #
1127         #  @ref tui_creation_point "Example"
1128         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1129             """
1130             Create a point by projection give coordinates on the given curve
1131             
1132             Parameters:
1133                 theRefCurve The referenced curve.
1134                 theX X-coordinate in 3D space
1135                 theY Y-coordinate in 3D space
1136                 theZ Z-coordinate in 3D space
1137                 theName Object name; when specified, this parameter is used
1138                         for result publication in the study. Otherwise, if automatic
1139                         publication is switched on, default value is used for result name.
1140
1141             Returns:
1142                 New GEOM.GEOM_Object, containing the created point.
1143
1144             Example of usage:
1145                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1146             """
1147             # Example: see GEOM_TestAll.py
1148             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1149             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1150             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1151             anObj.SetParameters(Parameters)
1152             self._autoPublish(anObj, theName, "vertex")
1153             return anObj
1154
1155         ## Create a point, corresponding to the given length on the given curve.
1156         #  @param theRefCurve The referenced curve.
1157         #  @param theLength Length on the referenced curve. It can be negative.
1158         #  @param theStartPoint Point allowing to choose the direction for the calculation
1159         #                       of the length. If None, start from the first point of theRefCurve.
1160         #  @param theName Object name; when specified, this parameter is used
1161         #         for result publication in the study. Otherwise, if automatic
1162         #         publication is switched on, default value is used for result name.
1163         #
1164         #  @return New GEOM.GEOM_Object, containing the created point.
1165         #
1166         #  @ref tui_creation_point "Example"
1167         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1168             """
1169             Create a point, corresponding to the given length on the given curve.
1170
1171             Parameters:
1172                 theRefCurve The referenced curve.
1173                 theLength Length on the referenced curve. It can be negative.
1174                 theStartPoint Point allowing to choose the direction for the calculation
1175                               of the length. If None, start from the first point of theRefCurve.
1176                 theName Object name; when specified, this parameter is used
1177                         for result publication in the study. Otherwise, if automatic
1178                         publication is switched on, default value is used for result name.
1179
1180             Returns:
1181                 New GEOM.GEOM_Object, containing the created point.
1182             """
1183             # Example: see GEOM_TestAll.py
1184             theLength, Parameters = ParseParameters(theLength)
1185             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1186             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1187             anObj.SetParameters(Parameters)
1188             self._autoPublish(anObj, theName, "vertex")
1189             return anObj
1190
1191         ## Create a point, corresponding to the given parameters on the
1192         #    given surface.
1193         #  @param theRefSurf The referenced surface.
1194         #  @param theUParameter Value of U-parameter on the referenced surface.
1195         #  @param theVParameter Value of V-parameter on the referenced surface.
1196         #  @param theName Object name; when specified, this parameter is used
1197         #         for result publication in the study. Otherwise, if automatic
1198         #         publication is switched on, default value is used for result name.
1199         #
1200         #  @return New GEOM.GEOM_Object, containing the created point.
1201         #
1202         #  @ref swig_MakeVertexOnSurface "Example"
1203         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1204             """
1205             Create a point, corresponding to the given parameters on the
1206             given surface.
1207
1208             Parameters:
1209                 theRefSurf The referenced surface.
1210                 theUParameter Value of U-parameter on the referenced surface.
1211                 theVParameter Value of V-parameter on the referenced surface.
1212                 theName Object name; when specified, this parameter is used
1213                         for result publication in the study. Otherwise, if automatic
1214                         publication is switched on, default value is used for result name.
1215
1216             Returns:
1217                 New GEOM.GEOM_Object, containing the created point.
1218
1219             Example of usage:
1220                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1221             """
1222             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1223             # Example: see GEOM_TestAll.py
1224             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1225             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1226             anObj.SetParameters(Parameters);
1227             self._autoPublish(anObj, theName, "vertex")
1228             return anObj
1229
1230         ## Create a point by projection give coordinates on the given surface
1231         #  @param theRefSurf The referenced surface.
1232         #  @param theX X-coordinate in 3D space
1233         #  @param theY Y-coordinate in 3D space
1234         #  @param theZ Z-coordinate in 3D space
1235         #  @param theName Object name; when specified, this parameter is used
1236         #         for result publication in the study. Otherwise, if automatic
1237         #         publication is switched on, default value is used for result name.
1238         #
1239         #  @return New GEOM.GEOM_Object, containing the created point.
1240         #
1241         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1242         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1243             """
1244             Create a point by projection give coordinates on the given surface
1245
1246             Parameters:
1247                 theRefSurf The referenced surface.
1248                 theX X-coordinate in 3D space
1249                 theY Y-coordinate in 3D space
1250                 theZ Z-coordinate in 3D space
1251                 theName Object name; when specified, this parameter is used
1252                         for result publication in the study. Otherwise, if automatic
1253                         publication is switched on, default value is used for result name.
1254
1255             Returns:
1256                 New GEOM.GEOM_Object, containing the created point.
1257
1258             Example of usage:
1259                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1260             """
1261             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1262             # Example: see GEOM_TestAll.py
1263             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1264             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1265             anObj.SetParameters(Parameters);
1266             self._autoPublish(anObj, theName, "vertex")
1267             return anObj
1268
1269         ## Create a point, which lays on the given face.
1270         #  The point will lay in arbitrary place of the face.
1271         #  The only condition on it is a non-zero distance to the face boundary.
1272         #  Such point can be used to uniquely identify the face inside any
1273         #  shape in case, when the shape does not contain overlapped faces.
1274         #  @param theFace The referenced face.
1275         #  @param theName Object name; when specified, this parameter is used
1276         #         for result publication in the study. Otherwise, if automatic
1277         #         publication is switched on, default value is used for result name.
1278         #
1279         #  @return New GEOM.GEOM_Object, containing the created point.
1280         #
1281         #  @ref swig_MakeVertexInsideFace "Example"
1282         def MakeVertexInsideFace (self, theFace, theName=None):
1283             """
1284             Create a point, which lays on the given face.
1285             The point will lay in arbitrary place of the face.
1286             The only condition on it is a non-zero distance to the face boundary.
1287             Such point can be used to uniquely identify the face inside any
1288             shape in case, when the shape does not contain overlapped faces.
1289
1290             Parameters:
1291                 theFace The referenced face.
1292                 theName Object name; when specified, this parameter is used
1293                         for result publication in the study. Otherwise, if automatic
1294                         publication is switched on, default value is used for result name.
1295
1296             Returns:
1297                 New GEOM.GEOM_Object, containing the created point.
1298
1299             Example of usage:
1300                 p_on_face = geompy.MakeVertexInsideFace(Face)
1301             """
1302             # Example: see GEOM_TestAll.py
1303             anObj = self.BasicOp.MakePointOnFace(theFace)
1304             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1305             self._autoPublish(anObj, theName, "vertex")
1306             return anObj
1307
1308         ## Create a point on intersection of two lines.
1309         #  @param theRefLine1, theRefLine2 The referenced lines.
1310         #  @param theName Object name; when specified, this parameter is used
1311         #         for result publication in the study. Otherwise, if automatic
1312         #         publication is switched on, default value is used for result name.
1313         #
1314         #  @return New GEOM.GEOM_Object, containing the created point.
1315         #
1316         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1317         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1318             """
1319             Create a point on intersection of two lines.
1320
1321             Parameters:
1322                 theRefLine1, theRefLine2 The referenced lines.
1323                 theName Object name; when specified, this parameter is used
1324                         for result publication in the study. Otherwise, if automatic
1325                         publication is switched on, default value is used for result name.
1326
1327             Returns:
1328                 New GEOM.GEOM_Object, containing the created point.
1329             """
1330             # Example: see GEOM_TestAll.py
1331             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1332             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1333             self._autoPublish(anObj, theName, "vertex")
1334             return anObj
1335
1336         ## Create a tangent, corresponding to the given parameter on the given curve.
1337         #  @param theRefCurve The referenced curve.
1338         #  @param theParameter Value of parameter on the referenced curve.
1339         #  @param theName Object name; when specified, this parameter is used
1340         #         for result publication in the study. Otherwise, if automatic
1341         #         publication is switched on, default value is used for result name.
1342         #
1343         #  @return New GEOM.GEOM_Object, containing the created tangent.
1344         #
1345         #  @ref swig_MakeTangentOnCurve "Example"
1346         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1347             """
1348             Create a tangent, corresponding to the given parameter on the given curve.
1349
1350             Parameters:
1351                 theRefCurve The referenced curve.
1352                 theParameter Value of parameter on the referenced curve.
1353                 theName Object name; when specified, this parameter is used
1354                         for result publication in the study. Otherwise, if automatic
1355                         publication is switched on, default value is used for result name.
1356
1357             Returns:
1358                 New GEOM.GEOM_Object, containing the created tangent.
1359
1360             Example of usage:
1361                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1362             """
1363             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1364             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1365             self._autoPublish(anObj, theName, "tangent")
1366             return anObj
1367
1368         ## Create a tangent plane, corresponding to the given parameter on the given face.
1369         #  @param theFace The face for which tangent plane should be built.
1370         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1371         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1372         #  @param theTrimSize the size of plane.
1373         #  @param theName Object name; when specified, this parameter is used
1374         #         for result publication in the study. Otherwise, if automatic
1375         #         publication is switched on, default value is used for result name.
1376         #
1377         #  @return New GEOM.GEOM_Object, containing the created tangent.
1378         #
1379         #  @ref swig_MakeTangentPlaneOnFace "Example"
1380         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1381             """
1382             Create a tangent plane, corresponding to the given parameter on the given face.
1383
1384             Parameters:
1385                 theFace The face for which tangent plane should be built.
1386                 theParameterV vertical value of the center point (0.0 - 1.0).
1387                 theParameterU horisontal value of the center point (0.0 - 1.0).
1388                 theTrimSize the size of plane.
1389                 theName Object name; when specified, this parameter is used
1390                         for result publication in the study. Otherwise, if automatic
1391                         publication is switched on, default value is used for result name.
1392
1393            Returns: 
1394                 New GEOM.GEOM_Object, containing the created tangent.
1395
1396            Example of usage:
1397                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1398             """
1399             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1400             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1401             self._autoPublish(anObj, theName, "tangent")
1402             return anObj
1403
1404         ## Create a vector with the given components.
1405         #  @param theDX X component of the vector.
1406         #  @param theDY Y component of the vector.
1407         #  @param theDZ Z component of the vector.
1408         #  @param theName Object name; when specified, this parameter is used
1409         #         for result publication in the study. Otherwise, if automatic
1410         #         publication is switched on, default value is used for result name.
1411         #
1412         #  @return New GEOM.GEOM_Object, containing the created vector.
1413         #
1414         #  @ref tui_creation_vector "Example"
1415         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1416             """
1417             Create a vector with the given components.
1418
1419             Parameters:
1420                 theDX X component of the vector.
1421                 theDY Y component of the vector.
1422                 theDZ Z component of the vector.
1423                 theName Object name; when specified, this parameter is used
1424                         for result publication in the study. Otherwise, if automatic
1425                         publication is switched on, default value is used for result name.
1426
1427             Returns:     
1428                 New GEOM.GEOM_Object, containing the created vector.
1429             """
1430             # Example: see GEOM_TestAll.py
1431             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1432             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1433             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1434             anObj.SetParameters(Parameters)
1435             self._autoPublish(anObj, theName, "vector")
1436             return anObj
1437
1438         ## Create a vector between two points.
1439         #  @param thePnt1 Start point for the vector.
1440         #  @param thePnt2 End point for the vector.
1441         #  @param theName Object name; when specified, this parameter is used
1442         #         for result publication in the study. Otherwise, if automatic
1443         #         publication is switched on, default value is used for result name.
1444         #
1445         #  @return New GEOM.GEOM_Object, containing the created vector.
1446         #
1447         #  @ref tui_creation_vector "Example"
1448         def MakeVector(self, thePnt1, thePnt2, theName=None):
1449             """
1450             Create a vector between two points.
1451
1452             Parameters:
1453                 thePnt1 Start point for the vector.
1454                 thePnt2 End point for the vector.
1455                 theName Object name; when specified, this parameter is used
1456                         for result publication in the study. Otherwise, if automatic
1457                         publication is switched on, default value is used for result name.
1458
1459             Returns:        
1460                 New GEOM.GEOM_Object, containing the created vector.
1461             """
1462             # Example: see GEOM_TestAll.py
1463             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1464             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1465             self._autoPublish(anObj, theName, "vector")
1466             return anObj
1467
1468         ## Create a line, passing through the given point
1469         #  and parrallel to the given direction
1470         #  @param thePnt Point. The resulting line will pass through it.
1471         #  @param theDir Direction. The resulting line will be parallel to it.
1472         #  @param theName Object name; when specified, this parameter is used
1473         #         for result publication in the study. Otherwise, if automatic
1474         #         publication is switched on, default value is used for result name.
1475         #
1476         #  @return New GEOM.GEOM_Object, containing the created line.
1477         #
1478         #  @ref tui_creation_line "Example"
1479         def MakeLine(self, thePnt, theDir, theName=None):
1480             """
1481             Create a line, passing through the given point
1482             and parrallel to the given direction
1483
1484             Parameters:
1485                 thePnt Point. The resulting line will pass through it.
1486                 theDir Direction. The resulting line will be parallel to it.
1487                 theName Object name; when specified, this parameter is used
1488                         for result publication in the study. Otherwise, if automatic
1489                         publication is switched on, default value is used for result name.
1490
1491             Returns:
1492                 New GEOM.GEOM_Object, containing the created line.
1493             """
1494             # Example: see GEOM_TestAll.py
1495             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1496             RaiseIfFailed("MakeLine", self.BasicOp)
1497             self._autoPublish(anObj, theName, "line")
1498             return anObj
1499
1500         ## Create a line, passing through the given points
1501         #  @param thePnt1 First of two points, defining the line.
1502         #  @param thePnt2 Second of two points, defining the line.
1503         #  @param theName Object name; when specified, this parameter is used
1504         #         for result publication in the study. Otherwise, if automatic
1505         #         publication is switched on, default value is used for result name.
1506         #
1507         #  @return New GEOM.GEOM_Object, containing the created line.
1508         #
1509         #  @ref tui_creation_line "Example"
1510         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1511             """
1512             Create a line, passing through the given points
1513
1514             Parameters:
1515                 thePnt1 First of two points, defining the line.
1516                 thePnt2 Second of two points, defining the line.
1517                 theName Object name; when specified, this parameter is used
1518                         for result publication in the study. Otherwise, if automatic
1519                         publication is switched on, default value is used for result name.
1520
1521             Returns:
1522                 New GEOM.GEOM_Object, containing the created line.
1523             """
1524             # Example: see GEOM_TestAll.py
1525             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1526             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1527             self._autoPublish(anObj, theName, "line")
1528             return anObj
1529
1530         ## Create a line on two faces intersection.
1531         #  @param theFace1 First of two faces, defining the line.
1532         #  @param theFace2 Second of two faces, defining the line.
1533         #  @param theName Object name; when specified, this parameter is used
1534         #         for result publication in the study. Otherwise, if automatic
1535         #         publication is switched on, default value is used for result name.
1536         #
1537         #  @return New GEOM.GEOM_Object, containing the created line.
1538         #
1539         #  @ref swig_MakeLineTwoFaces "Example"
1540         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1541             """
1542             Create a line on two faces intersection.
1543
1544             Parameters:
1545                 theFace1 First of two faces, defining the line.
1546                 theFace2 Second of two faces, defining the line.
1547                 theName Object name; when specified, this parameter is used
1548                         for result publication in the study. Otherwise, if automatic
1549                         publication is switched on, default value is used for result name.
1550
1551             Returns:
1552                 New GEOM.GEOM_Object, containing the created line.
1553             """
1554             # Example: see GEOM_TestAll.py
1555             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1556             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1557             self._autoPublish(anObj, theName, "line")
1558             return anObj
1559
1560         ## Create a plane, passing through the given point
1561         #  and normal to the given vector.
1562         #  @param thePnt Point, the plane has to pass through.
1563         #  @param theVec Vector, defining the plane normal direction.
1564         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1565         #  @param theName Object name; when specified, this parameter is used
1566         #         for result publication in the study. Otherwise, if automatic
1567         #         publication is switched on, default value is used for result name.
1568         #
1569         #  @return New GEOM.GEOM_Object, containing the created plane.
1570         #
1571         #  @ref tui_creation_plane "Example"
1572         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1573             """
1574             Create a plane, passing through the given point
1575             and normal to the given vector.
1576
1577             Parameters:
1578                 thePnt Point, the plane has to pass through.
1579                 theVec Vector, defining the plane normal direction.
1580                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1581                 theName Object name; when specified, this parameter is used
1582                         for result publication in the study. Otherwise, if automatic
1583                         publication is switched on, default value is used for result name.
1584
1585             Returns:    
1586                 New GEOM.GEOM_Object, containing the created plane.
1587             """
1588             # Example: see GEOM_TestAll.py
1589             theTrimSize, Parameters = ParseParameters(theTrimSize);
1590             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1591             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1592             anObj.SetParameters(Parameters)
1593             self._autoPublish(anObj, theName, "plane")
1594             return anObj
1595
1596         ## Create a plane, passing through the three given points
1597         #  @param thePnt1 First of three points, defining the plane.
1598         #  @param thePnt2 Second of three points, defining the plane.
1599         #  @param thePnt3 Fird of three points, defining the plane.
1600         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1601         #  @param theName Object name; when specified, this parameter is used
1602         #         for result publication in the study. Otherwise, if automatic
1603         #         publication is switched on, default value is used for result name.
1604         #
1605         #  @return New GEOM.GEOM_Object, containing the created plane.
1606         #
1607         #  @ref tui_creation_plane "Example"
1608         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1609             """
1610             Create a plane, passing through the three given points
1611
1612             Parameters:
1613                 thePnt1 First of three points, defining the plane.
1614                 thePnt2 Second of three points, defining the plane.
1615                 thePnt3 Fird of three points, defining the plane.
1616                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1617                 theName Object name; when specified, this parameter is used
1618                         for result publication in the study. Otherwise, if automatic
1619                         publication is switched on, default value is used for result name.
1620
1621             Returns:
1622                 New GEOM.GEOM_Object, containing the created plane.
1623             """
1624             # Example: see GEOM_TestAll.py
1625             theTrimSize, Parameters = ParseParameters(theTrimSize);
1626             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1627             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1628             anObj.SetParameters(Parameters)
1629             self._autoPublish(anObj, theName, "plane")
1630             return anObj
1631
1632         ## Create a plane, similar to the existing one, but with another size of representing face.
1633         #  @param theFace Referenced plane or LCS(Marker).
1634         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1635         #  @param theName Object name; when specified, this parameter is used
1636         #         for result publication in the study. Otherwise, if automatic
1637         #         publication is switched on, default value is used for result name.
1638         #
1639         #  @return New GEOM.GEOM_Object, containing the created plane.
1640         #
1641         #  @ref tui_creation_plane "Example"
1642         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1643             """
1644             Create a plane, similar to the existing one, but with another size of representing face.
1645
1646             Parameters:
1647                 theFace Referenced plane or LCS(Marker).
1648                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1649                 theName Object name; when specified, this parameter is used
1650                         for result publication in the study. Otherwise, if automatic
1651                         publication is switched on, default value is used for result name.
1652
1653             Returns:
1654                 New GEOM.GEOM_Object, containing the created plane.
1655             """
1656             # Example: see GEOM_TestAll.py
1657             theTrimSize, Parameters = ParseParameters(theTrimSize);
1658             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1659             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1660             anObj.SetParameters(Parameters)
1661             self._autoPublish(anObj, theName, "plane")
1662             return anObj
1663
1664         ## Create a plane, passing through the 2 vectors
1665         #  with center in a start point of the first vector.
1666         #  @param theVec1 Vector, defining center point and plane direction.
1667         #  @param theVec2 Vector, defining the plane normal direction.
1668         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1669         #  @param theName Object name; when specified, this parameter is used
1670         #         for result publication in the study. Otherwise, if automatic
1671         #         publication is switched on, default value is used for result name.
1672         #
1673         #  @return New GEOM.GEOM_Object, containing the created plane.
1674         #
1675         #  @ref tui_creation_plane "Example"
1676         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1677             """
1678             Create a plane, passing through the 2 vectors
1679             with center in a start point of the first vector.
1680
1681             Parameters:
1682                 theVec1 Vector, defining center point and plane direction.
1683                 theVec2 Vector, defining the plane normal direction.
1684                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1685                 theName Object name; when specified, this parameter is used
1686                         for result publication in the study. Otherwise, if automatic
1687                         publication is switched on, default value is used for result name.
1688
1689             Returns: 
1690                 New GEOM.GEOM_Object, containing the created plane.
1691             """
1692             # Example: see GEOM_TestAll.py
1693             theTrimSize, Parameters = ParseParameters(theTrimSize);
1694             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1695             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1696             anObj.SetParameters(Parameters)
1697             self._autoPublish(anObj, theName, "plane")
1698             return anObj
1699
1700         ## Create a plane, based on a Local coordinate system.
1701         #  @param theLCS  coordinate system, defining plane.
1702         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1703         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1704         #  @param theName Object name; when specified, this parameter is used
1705         #         for result publication in the study. Otherwise, if automatic
1706         #         publication is switched on, default value is used for result name.
1707         #
1708         #  @return New GEOM.GEOM_Object, containing the created plane.
1709         #
1710         #  @ref tui_creation_plane "Example"
1711         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1712             """
1713             Create a plane, based on a Local coordinate system.
1714
1715            Parameters: 
1716                 theLCS  coordinate system, defining plane.
1717                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1718                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1719                 theName Object name; when specified, this parameter is used
1720                         for result publication in the study. Otherwise, if automatic
1721                         publication is switched on, default value is used for result name.
1722
1723             Returns: 
1724                 New GEOM.GEOM_Object, containing the created plane.
1725             """
1726             # Example: see GEOM_TestAll.py
1727             theTrimSize, Parameters = ParseParameters(theTrimSize);
1728             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1729             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1730             anObj.SetParameters(Parameters)
1731             self._autoPublish(anObj, theName, "plane")
1732             return anObj
1733
1734         ## Create a local coordinate system.
1735         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1736         #  @param XDX,XDY,XDZ Three components of OX direction
1737         #  @param YDX,YDY,YDZ Three components of OY direction
1738         #  @param theName Object name; when specified, this parameter is used
1739         #         for result publication in the study. Otherwise, if automatic
1740         #         publication is switched on, default value is used for result name.
1741         #
1742         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1743         #
1744         #  @ref swig_MakeMarker "Example"
1745         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1746             """
1747             Create a local coordinate system.
1748
1749             Parameters: 
1750                 OX,OY,OZ Three coordinates of coordinate system origin.
1751                 XDX,XDY,XDZ Three components of OX direction
1752                 YDX,YDY,YDZ Three components of OY direction
1753                 theName Object name; when specified, this parameter is used
1754                         for result publication in the study. Otherwise, if automatic
1755                         publication is switched on, default value is used for result name.
1756
1757             Returns: 
1758                 New GEOM.GEOM_Object, containing the created coordinate system.
1759             """
1760             # Example: see GEOM_TestAll.py
1761             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1762             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1763             RaiseIfFailed("MakeMarker", self.BasicOp)
1764             anObj.SetParameters(Parameters)
1765             self._autoPublish(anObj, theName, "lcs")
1766             return anObj
1767
1768         ## Create a local coordinate system from shape.
1769         #  @param theShape The initial shape to detect the coordinate system.
1770         #  @param theName Object name; when specified, this parameter is used
1771         #         for result publication in the study. Otherwise, if automatic
1772         #         publication is switched on, default value is used for result name.
1773         #
1774         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1775         #
1776         #  @ref tui_creation_lcs "Example"
1777         def MakeMarkerFromShape(self, theShape, theName=None):
1778             """
1779             Create a local coordinate system from shape.
1780
1781             Parameters:
1782                 theShape The initial shape to detect the coordinate system.
1783                 theName Object name; when specified, this parameter is used
1784                         for result publication in the study. Otherwise, if automatic
1785                         publication is switched on, default value is used for result name.
1786                 
1787             Returns: 
1788                 New GEOM.GEOM_Object, containing the created coordinate system.
1789             """
1790             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1791             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1792             self._autoPublish(anObj, theName, "lcs")
1793             return anObj
1794
1795         ## Create a local coordinate system from point and two vectors.
1796         #  @param theOrigin Point of coordinate system origin.
1797         #  @param theXVec Vector of X direction
1798         #  @param theYVec Vector of Y direction
1799         #  @param theName Object name; when specified, this parameter is used
1800         #         for result publication in the study. Otherwise, if automatic
1801         #         publication is switched on, default value is used for result name.
1802         #
1803         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1804         #
1805         #  @ref tui_creation_lcs "Example"
1806         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1807             """
1808             Create a local coordinate system from point and two vectors.
1809
1810             Parameters:
1811                 theOrigin Point of coordinate system origin.
1812                 theXVec Vector of X direction
1813                 theYVec Vector of Y direction
1814                 theName Object name; when specified, this parameter is used
1815                         for result publication in the study. Otherwise, if automatic
1816                         publication is switched on, default value is used for result name.
1817
1818             Returns: 
1819                 New GEOM.GEOM_Object, containing the created coordinate system.
1820
1821             """
1822             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1823             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1824             self._autoPublish(anObj, theName, "lcs")
1825             return anObj
1826
1827         # end of l3_basic_go
1828         ## @}
1829
1830         ## @addtogroup l4_curves
1831         ## @{
1832
1833         ##  Create an arc of circle, passing through three given points.
1834         #  @param thePnt1 Start point of the arc.
1835         #  @param thePnt2 Middle point of the arc.
1836         #  @param thePnt3 End point of the arc.
1837         #  @param theName Object name; when specified, this parameter is used
1838         #         for result publication in the study. Otherwise, if automatic
1839         #         publication is switched on, default value is used for result name.
1840         #
1841         #  @return New GEOM.GEOM_Object, containing the created arc.
1842         #
1843         #  @ref swig_MakeArc "Example"
1844         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1845             """
1846             Create an arc of circle, passing through three given points.
1847
1848             Parameters:
1849                 thePnt1 Start point of the arc.
1850                 thePnt2 Middle point of the arc.
1851                 thePnt3 End point of the arc.
1852                 theName Object name; when specified, this parameter is used
1853                         for result publication in the study. Otherwise, if automatic
1854                         publication is switched on, default value is used for result name.
1855
1856             Returns: 
1857                 New GEOM.GEOM_Object, containing the created arc.
1858             """
1859             # Example: see GEOM_TestAll.py
1860             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1861             RaiseIfFailed("MakeArc", self.CurvesOp)
1862             self._autoPublish(anObj, theName, "arc")
1863             return anObj
1864
1865         ##  Create an arc of circle from a center and 2 points.
1866         #  @param thePnt1 Center of the arc
1867         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1868         #  @param thePnt3 End point of the arc (Gives also a direction)
1869         #  @param theSense Orientation of the arc
1870         #  @param theName Object name; when specified, this parameter is used
1871         #         for result publication in the study. Otherwise, if automatic
1872         #         publication is switched on, default value is used for result name.
1873         #
1874         #  @return New GEOM.GEOM_Object, containing the created arc.
1875         #
1876         #  @ref swig_MakeArc "Example"
1877         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1878             """
1879             Create an arc of circle from a center and 2 points.
1880
1881             Parameters:
1882                 thePnt1 Center of the arc
1883                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1884                 thePnt3 End point of the arc (Gives also a direction)
1885                 theSense Orientation of the arc
1886                 theName Object name; when specified, this parameter is used
1887                         for result publication in the study. Otherwise, if automatic
1888                         publication is switched on, default value is used for result name.
1889
1890             Returns:
1891                 New GEOM.GEOM_Object, containing the created arc.
1892             """
1893             # Example: see GEOM_TestAll.py
1894             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1895             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1896             self._autoPublish(anObj, theName, "arc")
1897             return anObj
1898
1899         ##  Create an arc of ellipse, of center and two points.
1900         #  @param theCenter Center of the arc.
1901         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1902         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1903         #  @param theName Object name; when specified, this parameter is used
1904         #         for result publication in the study. Otherwise, if automatic
1905         #         publication is switched on, default value is used for result name.
1906         #
1907         #  @return New GEOM.GEOM_Object, containing the created arc.
1908         #
1909         #  @ref swig_MakeArc "Example"
1910         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1911             """
1912             Create an arc of ellipse, of center and two points.
1913
1914             Parameters:
1915                 theCenter Center of the arc.
1916                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1917                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1918                 theName Object name; when specified, this parameter is used
1919                         for result publication in the study. Otherwise, if automatic
1920                         publication is switched on, default value is used for result name.
1921
1922             Returns:
1923                 New GEOM.GEOM_Object, containing the created arc.
1924             """
1925             # Example: see GEOM_TestAll.py
1926             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1927             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1928             self._autoPublish(anObj, theName, "arc")
1929             return anObj
1930
1931         ## Create a circle with given center, normal vector and radius.
1932         #  @param thePnt Circle center.
1933         #  @param theVec Vector, normal to the plane of the circle.
1934         #  @param theR Circle radius.
1935         #  @param theName Object name; when specified, this parameter is used
1936         #         for result publication in the study. Otherwise, if automatic
1937         #         publication is switched on, default value is used for result name.
1938         #
1939         #  @return New GEOM.GEOM_Object, containing the created circle.
1940         #
1941         #  @ref tui_creation_circle "Example"
1942         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1943             """
1944             Create a circle with given center, normal vector and radius.
1945
1946             Parameters:
1947                 thePnt Circle center.
1948                 theVec Vector, normal to the plane of the circle.
1949                 theR Circle radius.
1950                 theName Object name; when specified, this parameter is used
1951                         for result publication in the study. Otherwise, if automatic
1952                         publication is switched on, default value is used for result name.
1953
1954             Returns:
1955                 New GEOM.GEOM_Object, containing the created circle.
1956             """
1957             # Example: see GEOM_TestAll.py
1958             theR, Parameters = ParseParameters(theR)
1959             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1960             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1961             anObj.SetParameters(Parameters)
1962             self._autoPublish(anObj, theName, "circle")
1963             return anObj
1964
1965         ## Create a circle with given radius.
1966         #  Center of the circle will be in the origin of global
1967         #  coordinate system and normal vector will be codirected with Z axis
1968         #  @param theR Circle radius.
1969         #  @param theName Object name; when specified, this parameter is used
1970         #         for result publication in the study. Otherwise, if automatic
1971         #         publication is switched on, default value is used for result name.
1972         #
1973         #  @return New GEOM.GEOM_Object, containing the created circle.
1974         def MakeCircleR(self, theR, theName=None):
1975             """
1976             Create a circle with given radius.
1977             Center of the circle will be in the origin of global
1978             coordinate system and normal vector will be codirected with Z axis
1979
1980             Parameters:
1981                 theR Circle radius.
1982                 theName Object name; when specified, this parameter is used
1983                         for result publication in the study. Otherwise, if automatic
1984                         publication is switched on, default value is used for result name.
1985
1986             Returns:
1987                 New GEOM.GEOM_Object, containing the created circle.
1988             """
1989             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1990             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1991             self._autoPublish(anObj, theName, "circle")
1992             return anObj
1993
1994         ## Create a circle, passing through three given points
1995         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1996         #  @param theName Object name; when specified, this parameter is used
1997         #         for result publication in the study. Otherwise, if automatic
1998         #         publication is switched on, default value is used for result name.
1999         #
2000         #  @return New GEOM.GEOM_Object, containing the created circle.
2001         #
2002         #  @ref tui_creation_circle "Example"
2003         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2004             """
2005             Create a circle, passing through three given points
2006
2007             Parameters:
2008                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2009                 theName Object name; when specified, this parameter is used
2010                         for result publication in the study. Otherwise, if automatic
2011                         publication is switched on, default value is used for result name.
2012
2013             Returns:
2014                 New GEOM.GEOM_Object, containing the created circle.
2015             """
2016             # Example: see GEOM_TestAll.py
2017             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2018             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2019             self._autoPublish(anObj, theName, "circle")
2020             return anObj
2021
2022         ## Create a circle, with given point1 as center,
2023         #  passing through the point2 as radius and laying in the plane,
2024         #  defined by all three given points.
2025         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2026         #  @param theName Object name; when specified, this parameter is used
2027         #         for result publication in the study. Otherwise, if automatic
2028         #         publication is switched on, default value is used for result name.
2029         #
2030         #  @return New GEOM.GEOM_Object, containing the created circle.
2031         #
2032         #  @ref swig_MakeCircle "Example"
2033         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2034             """
2035             Create a circle, with given point1 as center,
2036             passing through the point2 as radius and laying in the plane,
2037             defined by all three given points.
2038
2039             Parameters:
2040                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2041                 theName Object name; when specified, this parameter is used
2042                         for result publication in the study. Otherwise, if automatic
2043                         publication is switched on, default value is used for result name.
2044
2045             Returns:
2046                 New GEOM.GEOM_Object, containing the created circle.
2047             """
2048             # Example: see GEOM_example6.py
2049             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2050             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2051             self._autoPublish(anObj, theName, "circle")
2052             return anObj
2053
2054         ## Create an ellipse with given center, normal vector and radiuses.
2055         #  @param thePnt Ellipse center.
2056         #  @param theVec Vector, normal to the plane of the ellipse.
2057         #  @param theRMajor Major ellipse radius.
2058         #  @param theRMinor Minor ellipse radius.
2059         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2060         #  @param theName Object name; when specified, this parameter is used
2061         #         for result publication in the study. Otherwise, if automatic
2062         #         publication is switched on, default value is used for result name.
2063         #
2064         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2065         #
2066         #  @ref tui_creation_ellipse "Example"
2067         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2068             """
2069             Create an ellipse with given center, normal vector and radiuses.
2070
2071             Parameters:
2072                 thePnt Ellipse center.
2073                 theVec Vector, normal to the plane of the ellipse.
2074                 theRMajor Major ellipse radius.
2075                 theRMinor Minor ellipse radius.
2076                 theVecMaj Vector, direction of the ellipse's main axis.
2077                 theName Object name; when specified, this parameter is used
2078                         for result publication in the study. Otherwise, if automatic
2079                         publication is switched on, default value is used for result name.
2080
2081             Returns:    
2082                 New GEOM.GEOM_Object, containing the created ellipse.
2083             """
2084             # Example: see GEOM_TestAll.py
2085             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2086             if theVecMaj is not None:
2087                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2088             else:
2089                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2090                 pass
2091             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2092             anObj.SetParameters(Parameters)
2093             self._autoPublish(anObj, theName, "ellipse")
2094             return anObj
2095
2096         ## Create an ellipse with given radiuses.
2097         #  Center of the ellipse will be in the origin of global
2098         #  coordinate system and normal vector will be codirected with Z axis
2099         #  @param theRMajor Major ellipse radius.
2100         #  @param theRMinor Minor ellipse radius.
2101         #  @param theName Object name; when specified, this parameter is used
2102         #         for result publication in the study. Otherwise, if automatic
2103         #         publication is switched on, default value is used for result name.
2104         #
2105         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2106         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2107             """
2108             Create an ellipse with given radiuses.
2109             Center of the ellipse will be in the origin of global
2110             coordinate system and normal vector will be codirected with Z axis
2111
2112             Parameters:
2113                 theRMajor Major ellipse radius.
2114                 theRMinor Minor ellipse radius.
2115                 theName Object name; when specified, this parameter is used
2116                         for result publication in the study. Otherwise, if automatic
2117                         publication is switched on, default value is used for result name.
2118
2119             Returns:
2120             New GEOM.GEOM_Object, containing the created ellipse.
2121             """
2122             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2123             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2124             self._autoPublish(anObj, theName, "ellipse")
2125             return anObj
2126
2127         ## Create a polyline on the set of points.
2128         #  @param thePoints Sequence of points for the polyline.
2129         #  @param theIsClosed If True, build a closed wire.
2130         #  @param theName Object name; when specified, this parameter is used
2131         #         for result publication in the study. Otherwise, if automatic
2132         #         publication is switched on, default value is used for result name.
2133         #
2134         #  @return New GEOM.GEOM_Object, containing the created polyline.
2135         #
2136         #  @ref tui_creation_curve "Example"
2137         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2138             """
2139             Create a polyline on the set of points.
2140
2141             Parameters:
2142                 thePoints Sequence of points for the polyline.
2143                 theIsClosed If True, build a closed wire.
2144                 theName Object name; when specified, this parameter is used
2145                         for result publication in the study. Otherwise, if automatic
2146                         publication is switched on, default value is used for result name.
2147
2148             Returns:
2149                 New GEOM.GEOM_Object, containing the created polyline.
2150             """
2151             # Example: see GEOM_TestAll.py
2152             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2153             RaiseIfFailed("MakePolyline", self.CurvesOp)
2154             self._autoPublish(anObj, theName, "polyline")
2155             return anObj
2156
2157         ## Create bezier curve on the set of points.
2158         #  @param thePoints Sequence of points for the bezier curve.
2159         #  @param theIsClosed If True, build a closed curve.
2160         #  @param theName Object name; when specified, this parameter is used
2161         #         for result publication in the study. Otherwise, if automatic
2162         #         publication is switched on, default value is used for result name.
2163         #
2164         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2165         #
2166         #  @ref tui_creation_curve "Example"
2167         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2168             """
2169             Create bezier curve on the set of points.
2170
2171             Parameters:
2172                 thePoints Sequence of points for the bezier curve.
2173                 theIsClosed If True, build a closed curve.
2174                 theName Object name; when specified, this parameter is used
2175                         for result publication in the study. Otherwise, if automatic
2176                         publication is switched on, default value is used for result name.
2177
2178             Returns:
2179                 New GEOM.GEOM_Object, containing the created bezier curve.
2180             """
2181             # Example: see GEOM_TestAll.py
2182             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2183             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2184             self._autoPublish(anObj, theName, "bezier")
2185             return anObj
2186
2187         ## Create B-Spline curve on the set of points.
2188         #  @param thePoints Sequence of points for the B-Spline curve.
2189         #  @param theIsClosed If True, build a closed curve.
2190         #  @param theDoReordering If TRUE, the algo does not follow the order of
2191         #                         \a thePoints but searches for the closest vertex.
2192         #  @param theName Object name; when specified, this parameter is used
2193         #         for result publication in the study. Otherwise, if automatic
2194         #         publication is switched on, default value is used for result name.
2195         #
2196         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2197         #
2198         #  @ref tui_creation_curve "Example"
2199         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2200             """
2201             Create B-Spline curve on the set of points.
2202
2203             Parameters:
2204                 thePoints Sequence of points for the B-Spline curve.
2205                 theIsClosed If True, build a closed curve.
2206                 theDoReordering If True, the algo does not follow the order of
2207                                 thePoints but searches for the closest vertex.
2208                 theName Object name; when specified, this parameter is used
2209                         for result publication in the study. Otherwise, if automatic
2210                         publication is switched on, default value is used for result name.
2211
2212             Returns:                     
2213                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2214             """
2215             # Example: see GEOM_TestAll.py
2216             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2217             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2218             self._autoPublish(anObj, theName, "bspline")
2219             return anObj
2220
2221         ## Create B-Spline curve on the set of points.
2222         #  @param thePoints Sequence of points for the B-Spline curve.
2223         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2224         #  @param theLastVec Vector object, defining the curve direction at its last point.
2225         #  @param theName Object name; when specified, this parameter is used
2226         #         for result publication in the study. Otherwise, if automatic
2227         #         publication is switched on, default value is used for result name.
2228         #
2229         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2230         #
2231         #  @ref tui_creation_curve "Example"
2232         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2233             """
2234             Create B-Spline curve on the set of points.
2235
2236             Parameters:
2237                 thePoints Sequence of points for the B-Spline curve.
2238                 theFirstVec Vector object, defining the curve direction at its first point.
2239                 theLastVec Vector object, defining the curve direction at its last point.
2240                 theName Object name; when specified, this parameter is used
2241                         for result publication in the study. Otherwise, if automatic
2242                         publication is switched on, default value is used for result name.
2243
2244             Returns:                     
2245                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2246             """
2247             # Example: see GEOM_TestAll.py
2248             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2249             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2250             self._autoPublish(anObj, theName, "bspline")
2251             return anObj
2252
2253         ## Creates a curve using the parametric definition of the basic points.
2254         #  @param thexExpr parametric equation of the coordinates X.
2255         #  @param theyExpr parametric equation of the coordinates Y.
2256         #  @param thezExpr parametric equation of the coordinates Z.
2257         #  @param theParamMin the minimal value of the parameter.
2258         #  @param theParamMax the maximum value of the parameter.
2259         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2260         #  @param theCurveType the type of the curve,
2261         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2262         #  @param theNewMethod flag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug.
2263         #  @param theName Object name; when specified, this parameter is used
2264         #         for result publication in the study. Otherwise, if automatic
2265         #         publication is switched on, default value is used for result name.
2266         #
2267         #  @return New GEOM.GEOM_Object, containing the created curve.
2268         #
2269         #  @ref tui_creation_curve "Example"
2270         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2271                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2272             """
2273             Creates a curve using the parametric definition of the basic points.
2274
2275             Parameters:
2276                 thexExpr parametric equation of the coordinates X.
2277                 theyExpr parametric equation of the coordinates Y.
2278                 thezExpr parametric equation of the coordinates Z.
2279                 theParamMin the minimal value of the parameter.
2280                 theParamMax the maximum value of the parameter.
2281                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2282                 theCurveType the type of the curve,
2283                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2284                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2285                              method is used which can lead to a bug.
2286                 theName Object name; when specified, this parameter is used
2287                         for result publication in the study. Otherwise, if automatic
2288                         publication is switched on, default value is used for result name.
2289
2290             Returns:
2291                 New GEOM.GEOM_Object, containing the created curve.
2292             """
2293             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2294             if theNewMethod:
2295               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2296             else:
2297               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2298             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2299             anObj.SetParameters(Parameters)
2300             self._autoPublish(anObj, theName, "curve")
2301             return anObj
2302
2303         ## Create an isoline curve on a face.
2304         #  @param theFace the face for which an isoline is created.
2305         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2306         #         creation.
2307         #  @param theParameter the U parameter for U-isoline or V parameter
2308         #         for V-isoline.
2309         #  @param theName Object name; when specified, this parameter is used
2310         #         for result publication in the study. Otherwise, if automatic
2311         #         publication is switched on, default value is used for result name.
2312         #
2313         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2314         #          a compound of edges.
2315         #
2316         #  @ref tui_creation_curve "Example"
2317         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2318             """
2319             Create an isoline curve on a face.
2320
2321             Parameters:
2322                 theFace the face for which an isoline is created.
2323                 IsUIsoline True for U-isoline creation; False for V-isoline
2324                            creation.
2325                 theParameter the U parameter for U-isoline or V parameter
2326                              for V-isoline.
2327                 theName Object name; when specified, this parameter is used
2328                         for result publication in the study. Otherwise, if automatic
2329                         publication is switched on, default value is used for result name.
2330
2331             Returns:
2332                 New GEOM.GEOM_Object, containing the created isoline edge or a
2333                 compound of edges.
2334             """
2335             # Example: see GEOM_TestAll.py
2336             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2337             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2338             if IsUIsoline:
2339                 self._autoPublish(anObj, theName, "U-Isoline")
2340             else:
2341                 self._autoPublish(anObj, theName, "V-Isoline")
2342             return anObj
2343
2344         # end of l4_curves
2345         ## @}
2346
2347         ## @addtogroup l3_sketcher
2348         ## @{
2349
2350         ## Create a sketcher (wire or face), following the textual description,
2351         #  passed through <VAR>theCommand</VAR> argument. \n
2352         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2353         #  Format of the description string have to be the following:
2354         #
2355         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2356         #
2357         #  Where:
2358         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2359         #  - CMD is one of
2360         #     - "R angle" : Set the direction by angle
2361         #     - "D dx dy" : Set the direction by DX & DY
2362         #     .
2363         #       \n
2364         #     - "TT x y" : Create segment by point at X & Y
2365         #     - "T dx dy" : Create segment by point with DX & DY
2366         #     - "L length" : Create segment by direction & Length
2367         #     - "IX x" : Create segment by direction & Intersect. X
2368         #     - "IY y" : Create segment by direction & Intersect. Y
2369         #     .
2370         #       \n
2371         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2372         #     - "AA x y": Create arc by point at X & Y
2373         #     - "A dx dy" : Create arc by point with DX & DY
2374         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2375         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2376         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2377         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2378         #     .
2379         #       \n
2380         #     - "WW" : Close Wire (to finish)
2381         #     - "WF" : Close Wire and build face (to finish)
2382         #     .
2383         #        \n
2384         #  - Flag1 (= reverse) is 0 or 2 ...
2385         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2386         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2387         #     .
2388         #        \n
2389         #  - Flag2 (= control tolerance) is 0 or 1 ...
2390         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2391         #     - if 1 the wire is built only if the end point is on the arc
2392         #       with a tolerance of 10^-7 on the distance else the creation fails
2393         #
2394         #  @param theCommand String, defining the sketcher in local
2395         #                    coordinates of the working plane.
2396         #  @param theWorkingPlane Nine double values, defining origin,
2397         #                         OZ and OX directions of the working plane.
2398         #  @param theName Object name; when specified, this parameter is used
2399         #         for result publication in the study. Otherwise, if automatic
2400         #         publication is switched on, default value is used for result name.
2401         #
2402         #  @return New GEOM.GEOM_Object, containing the created wire.
2403         #
2404         #  @ref tui_sketcher_page "Example"
2405         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2406             """
2407             Create a sketcher (wire or face), following the textual description, passed
2408             through theCommand argument.
2409             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2410             Format of the description string have to be the following:
2411                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2412             Where:
2413             - x1, y1 are coordinates of the first sketcher point (zero by default),
2414             - CMD is one of
2415                - "R angle" : Set the direction by angle
2416                - "D dx dy" : Set the direction by DX & DY
2417                
2418                - "TT x y" : Create segment by point at X & Y
2419                - "T dx dy" : Create segment by point with DX & DY
2420                - "L length" : Create segment by direction & Length
2421                - "IX x" : Create segment by direction & Intersect. X
2422                - "IY y" : Create segment by direction & Intersect. Y
2423
2424                - "C radius length" : Create arc by direction, radius and length(in degree)
2425                - "AA x y": Create arc by point at X & Y
2426                - "A dx dy" : Create arc by point with DX & DY
2427                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2428                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2429                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2430                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2431
2432                - "WW" : Close Wire (to finish)
2433                - "WF" : Close Wire and build face (to finish)
2434             
2435             - Flag1 (= reverse) is 0 or 2 ...
2436                - if 0 the drawn arc is the one of lower angle (< Pi)
2437                - if 2 the drawn arc ius the one of greater angle (> Pi)
2438         
2439             - Flag2 (= control tolerance) is 0 or 1 ...
2440                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2441                - if 1 the wire is built only if the end point is on the arc
2442                  with a tolerance of 10^-7 on the distance else the creation fails
2443
2444             Parameters:
2445                 theCommand String, defining the sketcher in local
2446                            coordinates of the working plane.
2447                 theWorkingPlane Nine double values, defining origin,
2448                                 OZ and OX directions of the working plane.
2449                 theName Object name; when specified, this parameter is used
2450                         for result publication in the study. Otherwise, if automatic
2451                         publication is switched on, default value is used for result name.
2452
2453             Returns:
2454                 New GEOM.GEOM_Object, containing the created wire.
2455             """
2456             # Example: see GEOM_TestAll.py
2457             theCommand,Parameters = ParseSketcherCommand(theCommand)
2458             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2459             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2460             anObj.SetParameters(Parameters)
2461             self._autoPublish(anObj, theName, "wire")
2462             return anObj
2463
2464         ## Create a sketcher (wire or face), following the textual description,
2465         #  passed through <VAR>theCommand</VAR> argument. \n
2466         #  For format of the description string see MakeSketcher() method.\n
2467         #  @param theCommand String, defining the sketcher in local
2468         #                    coordinates of the working plane.
2469         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2470         #  @param theName Object name; when specified, this parameter is used
2471         #         for result publication in the study. Otherwise, if automatic
2472         #         publication is switched on, default value is used for result name.
2473         #
2474         #  @return New GEOM.GEOM_Object, containing the created wire.
2475         #
2476         #  @ref tui_sketcher_page "Example"
2477         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2478             """
2479             Create a sketcher (wire or face), following the textual description,
2480             passed through theCommand argument.
2481             For format of the description string see geompy.MakeSketcher() method.
2482
2483             Parameters:
2484                 theCommand String, defining the sketcher in local
2485                            coordinates of the working plane.
2486                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2487                 theName Object name; when specified, this parameter is used
2488                         for result publication in the study. Otherwise, if automatic
2489                         publication is switched on, default value is used for result name.
2490
2491             Returns:
2492                 New GEOM.GEOM_Object, containing the created wire.
2493             """
2494             theCommand,Parameters = ParseSketcherCommand(theCommand)
2495             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2496             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2497             anObj.SetParameters(Parameters)
2498             self._autoPublish(anObj, theName, "wire")
2499             return anObj
2500
2501         ## Obtain a 2D sketcher interface
2502         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2503         def Sketcher2D (self):
2504             """
2505             Obtain a 2D sketcher interface.
2506
2507             Example of usage:
2508                sk = geompy.Sketcher2D()
2509                sk.addPoint(20, 20)
2510                sk.addSegmentRelative(15, 70)
2511                sk.addSegmentPerpY(50)
2512                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2513                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2514                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2515                sk.close()
2516                Sketch_1 = sk.wire(geomObj_1)
2517             """
2518             sk = Sketcher2D (self)
2519             return sk
2520         
2521         ## Create a sketcher wire, following the numerical description,
2522         #  passed through <VAR>theCoordinates</VAR> argument. \n
2523         #  @param theCoordinates double values, defining points to create a wire,
2524         #                                                      passing from it.
2525         #  @param theName Object name; when specified, this parameter is used
2526         #         for result publication in the study. Otherwise, if automatic
2527         #         publication is switched on, default value is used for result name.
2528         #
2529         #  @return New GEOM.GEOM_Object, containing the created wire.
2530         #
2531         #  @ref tui_3dsketcher_page "Example"
2532         def Make3DSketcher(self, theCoordinates, theName=None):
2533             """
2534             Create a sketcher wire, following the numerical description,
2535             passed through theCoordinates argument.
2536
2537             Parameters:
2538                 theCoordinates double values, defining points to create a wire,
2539                                passing from it.
2540                 theName Object name; when specified, this parameter is used
2541                         for result publication in the study. Otherwise, if automatic
2542                         publication is switched on, default value is used for result name.
2543
2544             Returns:
2545                 New GEOM_Object, containing the created wire.
2546             """
2547             theCoordinates,Parameters = ParseParameters(theCoordinates)
2548             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2549             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2550             anObj.SetParameters(Parameters)
2551             self._autoPublish(anObj, theName, "wire")
2552             return anObj
2553
2554         ## Obtain a 3D sketcher interface
2555         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2556         #
2557         #  @ref tui_3dsketcher_page "Example"
2558         def Sketcher3D (self):
2559             """
2560             Obtain a 3D sketcher interface.
2561
2562             Example of usage:
2563                 sk = geompy.Sketcher3D()
2564                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2565                 sk.addPointsRelative(0, 0, 130)
2566                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2567                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2568                 sk.close()
2569                 a3D_Sketcher_1 = sk.wire()
2570             """
2571             sk = Sketcher3D (self)
2572             return sk
2573
2574         # end of l3_sketcher
2575         ## @}
2576
2577         ## @addtogroup l3_3d_primitives
2578         ## @{
2579
2580         ## Create a box by coordinates of two opposite vertices.
2581         #
2582         #  @param x1,y1,z1 double values, defining first point it.
2583         #  @param x2,y2,z2 double values, defining first point it.
2584         #  @param theName Object name; when specified, this parameter is used
2585         #         for result publication in the study. Otherwise, if automatic
2586         #         publication is switched on, default value is used for result name.
2587         #
2588         #  @return New GEOM.GEOM_Object, containing the created box.
2589         #
2590         #  @ref tui_creation_box "Example"
2591         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2592             """
2593             Create a box by coordinates of two opposite vertices.
2594             
2595             Parameters:
2596                 x1,y1,z1 double values, defining first point.
2597                 x2,y2,z2 double values, defining second point.
2598                 theName Object name; when specified, this parameter is used
2599                         for result publication in the study. Otherwise, if automatic
2600                         publication is switched on, default value is used for result name.
2601                 
2602             Returns:
2603                 New GEOM.GEOM_Object, containing the created box.
2604             """
2605             # Example: see GEOM_TestAll.py
2606             pnt1 = self.MakeVertex(x1,y1,z1)
2607             pnt2 = self.MakeVertex(x2,y2,z2)
2608             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2609             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2610
2611         ## Create a box with specified dimensions along the coordinate axes
2612         #  and with edges, parallel to the coordinate axes.
2613         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2614         #  @param theDX Length of Box edges, parallel to OX axis.
2615         #  @param theDY Length of Box edges, parallel to OY axis.
2616         #  @param theDZ Length of Box edges, parallel to OZ axis.
2617         #  @param theName Object name; when specified, this parameter is used
2618         #         for result publication in the study. Otherwise, if automatic
2619         #         publication is switched on, default value is used for result name.
2620         #
2621         #  @return New GEOM.GEOM_Object, containing the created box.
2622         #
2623         #  @ref tui_creation_box "Example"
2624         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2625             """
2626             Create a box with specified dimensions along the coordinate axes
2627             and with edges, parallel to the coordinate axes.
2628             Center of the box will be at point (DX/2, DY/2, DZ/2).
2629
2630             Parameters:
2631                 theDX Length of Box edges, parallel to OX axis.
2632                 theDY Length of Box edges, parallel to OY axis.
2633                 theDZ Length of Box edges, parallel to OZ axis.
2634                 theName Object name; when specified, this parameter is used
2635                         for result publication in the study. Otherwise, if automatic
2636                         publication is switched on, default value is used for result name.
2637
2638             Returns:   
2639                 New GEOM.GEOM_Object, containing the created box.
2640             """
2641             # Example: see GEOM_TestAll.py
2642             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2643             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2644             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2645             anObj.SetParameters(Parameters)
2646             self._autoPublish(anObj, theName, "box")
2647             return anObj
2648
2649         ## Create a box with two specified opposite vertices,
2650         #  and with edges, parallel to the coordinate axes
2651         #  @param thePnt1 First of two opposite vertices.
2652         #  @param thePnt2 Second of two opposite vertices.
2653         #  @param theName Object name; when specified, this parameter is used
2654         #         for result publication in the study. Otherwise, if automatic
2655         #         publication is switched on, default value is used for result name.
2656         #
2657         #  @return New GEOM.GEOM_Object, containing the created box.
2658         #
2659         #  @ref tui_creation_box "Example"
2660         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2661             """
2662             Create a box with two specified opposite vertices,
2663             and with edges, parallel to the coordinate axes
2664
2665             Parameters:
2666                 thePnt1 First of two opposite vertices.
2667                 thePnt2 Second of two opposite vertices.
2668                 theName Object name; when specified, this parameter is used
2669                         for result publication in the study. Otherwise, if automatic
2670                         publication is switched on, default value is used for result name.
2671
2672             Returns:
2673                 New GEOM.GEOM_Object, containing the created box.
2674             """
2675             # Example: see GEOM_TestAll.py
2676             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2677             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2678             self._autoPublish(anObj, theName, "box")
2679             return anObj
2680
2681         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2682         #  @param theH height of Face.
2683         #  @param theW width of Face.
2684         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2685         #  @param theName Object name; when specified, this parameter is used
2686         #         for result publication in the study. Otherwise, if automatic
2687         #         publication is switched on, default value is used for result name.
2688         #
2689         #  @return New GEOM.GEOM_Object, containing the created face.
2690         #
2691         #  @ref tui_creation_face "Example"
2692         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2693             """
2694             Create a face with specified dimensions with edges parallel to coordinate axes.
2695
2696             Parameters:
2697                 theH height of Face.
2698                 theW width of Face.
2699                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2700                 theName Object name; when specified, this parameter is used
2701                         for result publication in the study. Otherwise, if automatic
2702                         publication is switched on, default value is used for result name.
2703
2704             Returns:
2705                 New GEOM.GEOM_Object, containing the created face.
2706             """
2707             # Example: see GEOM_TestAll.py
2708             theH,theW,Parameters = ParseParameters(theH, theW)
2709             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2710             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2711             anObj.SetParameters(Parameters)
2712             self._autoPublish(anObj, theName, "rectangle")
2713             return anObj
2714
2715         ## Create a face from another plane and two sizes,
2716         #  vertical size and horisontal size.
2717         #  @param theObj   Normale vector to the creating face or
2718         #  the face object.
2719         #  @param theH     Height (vertical size).
2720         #  @param theW     Width (horisontal size).
2721         #  @param theName Object name; when specified, this parameter is used
2722         #         for result publication in the study. Otherwise, if automatic
2723         #         publication is switched on, default value is used for result name.
2724         #
2725         #  @return New GEOM.GEOM_Object, containing the created face.
2726         #
2727         #  @ref tui_creation_face "Example"
2728         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2729             """
2730             Create a face from another plane and two sizes,
2731             vertical size and horisontal size.
2732
2733             Parameters:
2734                 theObj   Normale vector to the creating face or
2735                          the face object.
2736                 theH     Height (vertical size).
2737                 theW     Width (horisontal size).
2738                 theName Object name; when specified, this parameter is used
2739                         for result publication in the study. Otherwise, if automatic
2740                         publication is switched on, default value is used for result name.
2741
2742             Returns:
2743                 New GEOM_Object, containing the created face.
2744             """
2745             # Example: see GEOM_TestAll.py
2746             theH,theW,Parameters = ParseParameters(theH, theW)
2747             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2748             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2749             anObj.SetParameters(Parameters)
2750             self._autoPublish(anObj, theName, "rectangle")
2751             return anObj
2752
2753         ## Create a disk with given center, normal vector and radius.
2754         #  @param thePnt Disk center.
2755         #  @param theVec Vector, normal to the plane of the disk.
2756         #  @param theR Disk radius.
2757         #  @param theName Object name; when specified, this parameter is used
2758         #         for result publication in the study. Otherwise, if automatic
2759         #         publication is switched on, default value is used for result name.
2760         #
2761         #  @return New GEOM.GEOM_Object, containing the created disk.
2762         #
2763         #  @ref tui_creation_disk "Example"
2764         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2765             """
2766             Create a disk with given center, normal vector and radius.
2767
2768             Parameters:
2769                 thePnt Disk center.
2770                 theVec Vector, normal to the plane of the disk.
2771                 theR Disk radius.
2772                 theName Object name; when specified, this parameter is used
2773                         for result publication in the study. Otherwise, if automatic
2774                         publication is switched on, default value is used for result name.
2775
2776             Returns:    
2777                 New GEOM.GEOM_Object, containing the created disk.
2778             """
2779             # Example: see GEOM_TestAll.py
2780             theR,Parameters = ParseParameters(theR)
2781             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2782             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2783             anObj.SetParameters(Parameters)
2784             self._autoPublish(anObj, theName, "disk")
2785             return anObj
2786
2787         ## Create a disk, passing through three given points
2788         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2789         #  @param theName Object name; when specified, this parameter is used
2790         #         for result publication in the study. Otherwise, if automatic
2791         #         publication is switched on, default value is used for result name.
2792         #
2793         #  @return New GEOM.GEOM_Object, containing the created disk.
2794         #
2795         #  @ref tui_creation_disk "Example"
2796         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2797             """
2798             Create a disk, passing through three given points
2799
2800             Parameters:
2801                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2802                 theName Object name; when specified, this parameter is used
2803                         for result publication in the study. Otherwise, if automatic
2804                         publication is switched on, default value is used for result name.
2805
2806             Returns:    
2807                 New GEOM.GEOM_Object, containing the created disk.
2808             """
2809             # Example: see GEOM_TestAll.py
2810             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2811             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2812             self._autoPublish(anObj, theName, "disk")
2813             return anObj
2814
2815         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2816         #  @param theR Radius of Face.
2817         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2818         #  @param theName Object name; when specified, this parameter is used
2819         #         for result publication in the study. Otherwise, if automatic
2820         #         publication is switched on, default value is used for result name.
2821         #
2822         #  @return New GEOM.GEOM_Object, containing the created disk.
2823         #
2824         #  @ref tui_creation_face "Example"
2825         def MakeDiskR(self, theR, theOrientation, theName=None):
2826             """
2827             Create a disk with specified dimensions along OX-OY coordinate axes.
2828
2829             Parameters:
2830                 theR Radius of Face.
2831                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2832                 theName Object name; when specified, this parameter is used
2833                         for result publication in the study. Otherwise, if automatic
2834                         publication is switched on, default value is used for result name.
2835
2836             Returns: 
2837                 New GEOM.GEOM_Object, containing the created disk.
2838
2839             Example of usage:
2840                 Disk3 = geompy.MakeDiskR(100., 1)
2841             """
2842             # Example: see GEOM_TestAll.py
2843             theR,Parameters = ParseParameters(theR)
2844             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2845             RaiseIfFailed("MakeDiskR", self.PrimOp)
2846             anObj.SetParameters(Parameters)
2847             self._autoPublish(anObj, theName, "disk")
2848             return anObj
2849
2850         ## Create a cylinder with given base point, axis, radius and height.
2851         #  @param thePnt Central point of cylinder base.
2852         #  @param theAxis Cylinder axis.
2853         #  @param theR Cylinder radius.
2854         #  @param theH Cylinder height.
2855         #  @param theName Object name; when specified, this parameter is used
2856         #         for result publication in the study. Otherwise, if automatic
2857         #         publication is switched on, default value is used for result name.
2858         #
2859         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2860         #
2861         #  @ref tui_creation_cylinder "Example"
2862         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2863             """
2864             Create a cylinder with given base point, axis, radius and height.
2865
2866             Parameters:
2867                 thePnt Central point of cylinder base.
2868                 theAxis Cylinder axis.
2869                 theR Cylinder radius.
2870                 theH Cylinder height.
2871                 theName Object name; when specified, this parameter is used
2872                         for result publication in the study. Otherwise, if automatic
2873                         publication is switched on, default value is used for result name.
2874
2875             Returns: 
2876                 New GEOM.GEOM_Object, containing the created cylinder.
2877             """
2878             # Example: see GEOM_TestAll.py
2879             theR,theH,Parameters = ParseParameters(theR, theH)
2880             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2881             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2882             anObj.SetParameters(Parameters)
2883             self._autoPublish(anObj, theName, "cylinder")
2884             return anObj
2885
2886         ## Create a cylinder with given radius and height at
2887         #  the origin of coordinate system. Axis of the cylinder
2888         #  will be collinear to the OZ axis of the coordinate system.
2889         #  @param theR Cylinder radius.
2890         #  @param theH Cylinder height.
2891         #  @param theName Object name; when specified, this parameter is used
2892         #         for result publication in the study. Otherwise, if automatic
2893         #         publication is switched on, default value is used for result name.
2894         #
2895         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2896         #
2897         #  @ref tui_creation_cylinder "Example"
2898         def MakeCylinderRH(self, theR, theH, theName=None):
2899             """
2900             Create a cylinder with given radius and height at
2901             the origin of coordinate system. Axis of the cylinder
2902             will be collinear to the OZ axis of the coordinate system.
2903
2904             Parameters:
2905                 theR Cylinder radius.
2906                 theH Cylinder height.
2907                 theName Object name; when specified, this parameter is used
2908                         for result publication in the study. Otherwise, if automatic
2909                         publication is switched on, default value is used for result name.
2910
2911             Returns:    
2912                 New GEOM.GEOM_Object, containing the created cylinder.
2913             """
2914             # Example: see GEOM_TestAll.py
2915             theR,theH,Parameters = ParseParameters(theR, theH)
2916             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2917             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2918             anObj.SetParameters(Parameters)
2919             self._autoPublish(anObj, theName, "cylinder")
2920             return anObj
2921
2922         ## Create a sphere with given center and radius.
2923         #  @param thePnt Sphere center.
2924         #  @param theR Sphere radius.
2925         #  @param theName Object name; when specified, this parameter is used
2926         #         for result publication in the study. Otherwise, if automatic
2927         #         publication is switched on, default value is used for result name.
2928         #
2929         #  @return New GEOM.GEOM_Object, containing the created sphere.
2930         #
2931         #  @ref tui_creation_sphere "Example"
2932         def MakeSpherePntR(self, thePnt, theR, theName=None):
2933             """
2934             Create a sphere with given center and radius.
2935
2936             Parameters:
2937                 thePnt Sphere center.
2938                 theR Sphere radius.
2939                 theName Object name; when specified, this parameter is used
2940                         for result publication in the study. Otherwise, if automatic
2941                         publication is switched on, default value is used for result name.
2942
2943             Returns:    
2944                 New GEOM.GEOM_Object, containing the created sphere.            
2945             """
2946             # Example: see GEOM_TestAll.py
2947             theR,Parameters = ParseParameters(theR)
2948             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2949             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2950             anObj.SetParameters(Parameters)
2951             self._autoPublish(anObj, theName, "sphere")
2952             return anObj
2953
2954         ## Create a sphere with given center and radius.
2955         #  @param x,y,z Coordinates of sphere center.
2956         #  @param theR Sphere radius.
2957         #  @param theName Object name; when specified, this parameter is used
2958         #         for result publication in the study. Otherwise, if automatic
2959         #         publication is switched on, default value is used for result name.
2960         #
2961         #  @return New GEOM.GEOM_Object, containing the created sphere.
2962         #
2963         #  @ref tui_creation_sphere "Example"
2964         def MakeSphere(self, x, y, z, theR, theName=None):
2965             """
2966             Create a sphere with given center and radius.
2967
2968             Parameters: 
2969                 x,y,z Coordinates of sphere center.
2970                 theR Sphere radius.
2971                 theName Object name; when specified, this parameter is used
2972                         for result publication in the study. Otherwise, if automatic
2973                         publication is switched on, default value is used for result name.
2974
2975             Returns:
2976                 New GEOM.GEOM_Object, containing the created sphere.
2977             """
2978             # Example: see GEOM_TestAll.py
2979             point = self.MakeVertex(x, y, z)
2980             # note: auto-publishing is done in self.MakeSpherePntR()
2981             anObj = self.MakeSpherePntR(point, theR, theName)
2982             return anObj
2983
2984         ## Create a sphere with given radius at the origin of coordinate system.
2985         #  @param theR Sphere radius.
2986         #  @param theName Object name; when specified, this parameter is used
2987         #         for result publication in the study. Otherwise, if automatic
2988         #         publication is switched on, default value is used for result name.
2989         #
2990         #  @return New GEOM.GEOM_Object, containing the created sphere.
2991         #
2992         #  @ref tui_creation_sphere "Example"
2993         def MakeSphereR(self, theR, theName=None):
2994             """
2995             Create a sphere with given radius at the origin of coordinate system.
2996
2997             Parameters: 
2998                 theR Sphere radius.
2999                 theName Object name; when specified, this parameter is used
3000                         for result publication in the study. Otherwise, if automatic
3001                         publication is switched on, default value is used for result name.
3002
3003             Returns:
3004                 New GEOM.GEOM_Object, containing the created sphere.            
3005             """
3006             # Example: see GEOM_TestAll.py
3007             theR,Parameters = ParseParameters(theR)
3008             anObj = self.PrimOp.MakeSphereR(theR)
3009             RaiseIfFailed("MakeSphereR", self.PrimOp)
3010             anObj.SetParameters(Parameters)
3011             self._autoPublish(anObj, theName, "sphere")
3012             return anObj
3013
3014         ## Create a cone with given base point, axis, height and radiuses.
3015         #  @param thePnt Central point of the first cone base.
3016         #  @param theAxis Cone axis.
3017         #  @param theR1 Radius of the first cone base.
3018         #  @param theR2 Radius of the second cone base.
3019         #    \note If both radiuses are non-zero, the cone will be truncated.
3020         #    \note If the radiuses are equal, a cylinder will be created instead.
3021         #  @param theH Cone height.
3022         #  @param theName Object name; when specified, this parameter is used
3023         #         for result publication in the study. Otherwise, if automatic
3024         #         publication is switched on, default value is used for result name.
3025         #
3026         #  @return New GEOM.GEOM_Object, containing the created cone.
3027         #
3028         #  @ref tui_creation_cone "Example"
3029         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3030             """
3031             Create a cone with given base point, axis, height and radiuses.
3032
3033             Parameters: 
3034                 thePnt Central point of the first cone base.
3035                 theAxis Cone axis.
3036                 theR1 Radius of the first cone base.
3037                 theR2 Radius of the second cone base.
3038                 theH Cone height.
3039                 theName Object name; when specified, this parameter is used
3040                         for result publication in the study. Otherwise, if automatic
3041                         publication is switched on, default value is used for result name.
3042
3043             Note:
3044                 If both radiuses are non-zero, the cone will be truncated.
3045                 If the radiuses are equal, a cylinder will be created instead.
3046
3047             Returns:
3048                 New GEOM.GEOM_Object, containing the created cone.
3049             """
3050             # Example: see GEOM_TestAll.py
3051             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3052             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3053             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3054             anObj.SetParameters(Parameters)
3055             self._autoPublish(anObj, theName, "cone")
3056             return anObj
3057
3058         ## Create a cone with given height and radiuses at
3059         #  the origin of coordinate system. Axis of the cone will
3060         #  be collinear to the OZ axis of the coordinate system.
3061         #  @param theR1 Radius of the first cone base.
3062         #  @param theR2 Radius of the second cone base.
3063         #    \note If both radiuses are non-zero, the cone will be truncated.
3064         #    \note If the radiuses are equal, a cylinder will be created instead.
3065         #  @param theH Cone height.
3066         #  @param theName Object name; when specified, this parameter is used
3067         #         for result publication in the study. Otherwise, if automatic
3068         #         publication is switched on, default value is used for result name.
3069         #
3070         #  @return New GEOM.GEOM_Object, containing the created cone.
3071         #
3072         #  @ref tui_creation_cone "Example"
3073         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3074             """
3075             Create a cone with given height and radiuses at
3076             the origin of coordinate system. Axis of the cone will
3077             be collinear to the OZ axis of the coordinate system.
3078
3079             Parameters: 
3080                 theR1 Radius of the first cone base.
3081                 theR2 Radius of the second cone base.
3082                 theH Cone height.
3083                 theName Object name; when specified, this parameter is used
3084                         for result publication in the study. Otherwise, if automatic
3085                         publication is switched on, default value is used for result name.
3086
3087             Note:
3088                 If both radiuses are non-zero, the cone will be truncated.
3089                 If the radiuses are equal, a cylinder will be created instead.
3090
3091             Returns:
3092                 New GEOM.GEOM_Object, containing the created cone.
3093             """
3094             # Example: see GEOM_TestAll.py
3095             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3096             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3097             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3098             anObj.SetParameters(Parameters)
3099             self._autoPublish(anObj, theName, "cone")
3100             return anObj
3101
3102         ## Create a torus with given center, normal vector and radiuses.
3103         #  @param thePnt Torus central point.
3104         #  @param theVec Torus axis of symmetry.
3105         #  @param theRMajor Torus major radius.
3106         #  @param theRMinor Torus minor radius.
3107         #  @param theName Object name; when specified, this parameter is used
3108         #         for result publication in the study. Otherwise, if automatic
3109         #         publication is switched on, default value is used for result name.
3110         #
3111         #  @return New GEOM.GEOM_Object, containing the created torus.
3112         #
3113         #  @ref tui_creation_torus "Example"
3114         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3115             """
3116             Create a torus with given center, normal vector and radiuses.
3117
3118             Parameters: 
3119                 thePnt Torus central point.
3120                 theVec Torus axis of symmetry.
3121                 theRMajor Torus major radius.
3122                 theRMinor Torus minor radius.
3123                 theName Object name; when specified, this parameter is used
3124                         for result publication in the study. Otherwise, if automatic
3125                         publication is switched on, default value is used for result name.
3126
3127            Returns:
3128                 New GEOM.GEOM_Object, containing the created torus.
3129             """
3130             # Example: see GEOM_TestAll.py
3131             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3132             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3133             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3134             anObj.SetParameters(Parameters)
3135             self._autoPublish(anObj, theName, "torus")
3136             return anObj
3137
3138         ## Create a torus with given radiuses at the origin of coordinate system.
3139         #  @param theRMajor Torus major radius.
3140         #  @param theRMinor Torus minor radius.
3141         #  @param theName Object name; when specified, this parameter is used
3142         #         for result publication in the study. Otherwise, if automatic
3143         #         publication is switched on, default value is used for result name.
3144         #
3145         #  @return New GEOM.GEOM_Object, containing the created torus.
3146         #
3147         #  @ref tui_creation_torus "Example"
3148         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3149             """
3150            Create a torus with given radiuses at the origin of coordinate system.
3151
3152            Parameters: 
3153                 theRMajor Torus major radius.
3154                 theRMinor Torus minor radius.
3155                 theName Object name; when specified, this parameter is used
3156                         for result publication in the study. Otherwise, if automatic
3157                         publication is switched on, default value is used for result name.
3158
3159            Returns:
3160                 New GEOM.GEOM_Object, containing the created torus.            
3161             """
3162             # Example: see GEOM_TestAll.py
3163             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3164             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3165             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3166             anObj.SetParameters(Parameters)
3167             self._autoPublish(anObj, theName, "torus")
3168             return anObj
3169
3170         # end of l3_3d_primitives
3171         ## @}
3172
3173         ## @addtogroup l3_complex
3174         ## @{
3175
3176         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3177         #  @param theBase Base shape to be extruded.
3178         #  @param thePoint1 First end of extrusion vector.
3179         #  @param thePoint2 Second end of extrusion vector.
3180         #  @param theScaleFactor Use it to make prism with scaled second base.
3181         #                        Nagative value means not scaled second base.
3182         #  @param theName Object name; when specified, this parameter is used
3183         #         for result publication in the study. Otherwise, if automatic
3184         #         publication is switched on, default value is used for result name.
3185         #
3186         #  @return New GEOM.GEOM_Object, containing the created prism.
3187         #
3188         #  @ref tui_creation_prism "Example"
3189         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3190             """
3191             Create a shape by extrusion of the base shape along a vector, defined by two points.
3192
3193             Parameters: 
3194                 theBase Base shape to be extruded.
3195                 thePoint1 First end of extrusion vector.
3196                 thePoint2 Second end of extrusion vector.
3197                 theScaleFactor Use it to make prism with scaled second base.
3198                                Nagative value means not scaled second base.
3199                 theName Object name; when specified, this parameter is used
3200                         for result publication in the study. Otherwise, if automatic
3201                         publication is switched on, default value is used for result name.
3202
3203             Returns:
3204                 New GEOM.GEOM_Object, containing the created prism.
3205             """
3206             # Example: see GEOM_TestAll.py
3207             anObj = None
3208             Parameters = ""
3209             if theScaleFactor > 0:
3210                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3211                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3212             else:
3213                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3214             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3215             anObj.SetParameters(Parameters)
3216             self._autoPublish(anObj, theName, "prism")
3217             return anObj
3218
3219         ## Create a shape by extrusion of the base shape along a
3220         #  vector, defined by two points, in 2 Ways (forward/backward).
3221         #  @param theBase Base shape to be extruded.
3222         #  @param thePoint1 First end of extrusion vector.
3223         #  @param thePoint2 Second end of extrusion vector.
3224         #  @param theName Object name; when specified, this parameter is used
3225         #         for result publication in the study. Otherwise, if automatic
3226         #         publication is switched on, default value is used for result name.
3227         #
3228         #  @return New GEOM.GEOM_Object, containing the created prism.
3229         #
3230         #  @ref tui_creation_prism "Example"
3231         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3232             """
3233             Create a shape by extrusion of the base shape along a
3234             vector, defined by two points, in 2 Ways (forward/backward).
3235
3236             Parameters: 
3237                 theBase Base shape to be extruded.
3238                 thePoint1 First end of extrusion vector.
3239                 thePoint2 Second end of extrusion vector.
3240                 theName Object name; when specified, this parameter is used
3241                         for result publication in the study. Otherwise, if automatic
3242                         publication is switched on, default value is used for result name.
3243
3244             Returns:
3245                 New GEOM.GEOM_Object, containing the created prism.
3246             """
3247             # Example: see GEOM_TestAll.py
3248             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3249             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3250             self._autoPublish(anObj, theName, "prism")
3251             return anObj
3252
3253         ## Create a shape by extrusion of the base shape along the vector,
3254         #  i.e. all the space, transfixed by the base shape during its translation
3255         #  along the vector on the given distance.
3256         #  @param theBase Base shape to be extruded.
3257         #  @param theVec Direction of extrusion.
3258         #  @param theH Prism dimension along theVec.
3259         #  @param theScaleFactor Use it to make prism with scaled second base.
3260         #                        Negative value means not scaled second base.
3261         #  @param theName Object name; when specified, this parameter is used
3262         #         for result publication in the study. Otherwise, if automatic
3263         #         publication is switched on, default value is used for result name.
3264         #
3265         #  @return New GEOM.GEOM_Object, containing the created prism.
3266         #
3267         #  @ref tui_creation_prism "Example"
3268         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3269             """
3270             Create a shape by extrusion of the base shape along the vector,
3271             i.e. all the space, transfixed by the base shape during its translation
3272             along the vector on the given distance.
3273
3274             Parameters: 
3275                 theBase Base shape to be extruded.
3276                 theVec Direction of extrusion.
3277                 theH Prism dimension along theVec.
3278                 theScaleFactor Use it to make prism with scaled second base.
3279                                Negative value means not scaled second base.
3280                 theName Object name; when specified, this parameter is used
3281                         for result publication in the study. Otherwise, if automatic
3282                         publication is switched on, default value is used for result name.
3283
3284             Returns:
3285                 New GEOM.GEOM_Object, containing the created prism.
3286             """
3287             # Example: see GEOM_TestAll.py
3288             anObj = None
3289             Parameters = ""
3290             if theScaleFactor > 0:
3291                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3292                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3293             else:
3294                 theH,Parameters = ParseParameters(theH)
3295                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3296             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3297             anObj.SetParameters(Parameters)
3298             self._autoPublish(anObj, theName, "prism")
3299             return anObj
3300
3301         ## Create a shape by extrusion of the base shape along the vector,
3302         #  i.e. all the space, transfixed by the base shape during its translation
3303         #  along the vector on the given distance in 2 Ways (forward/backward).
3304         #  @param theBase Base shape to be extruded.
3305         #  @param theVec Direction of extrusion.
3306         #  @param theH Prism dimension along theVec in forward direction.
3307         #  @param theName Object name; when specified, this parameter is used
3308         #         for result publication in the study. Otherwise, if automatic
3309         #         publication is switched on, default value is used for result name.
3310         #
3311         #  @return New GEOM.GEOM_Object, containing the created prism.
3312         #
3313         #  @ref tui_creation_prism "Example"
3314         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3315             """
3316             Create a shape by extrusion of the base shape along the vector,
3317             i.e. all the space, transfixed by the base shape during its translation
3318             along the vector on the given distance in 2 Ways (forward/backward).
3319
3320             Parameters:
3321                 theBase Base shape to be extruded.
3322                 theVec Direction of extrusion.
3323                 theH Prism dimension along theVec in forward direction.
3324                 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             Returns:
3329                 New GEOM.GEOM_Object, containing the created prism.
3330             """
3331             # Example: see GEOM_TestAll.py
3332             theH,Parameters = ParseParameters(theH)
3333             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3334             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3335             anObj.SetParameters(Parameters)
3336             self._autoPublish(anObj, theName, "prism")
3337             return anObj
3338
3339         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3340         #  @param theBase Base shape to be extruded.
3341         #  @param theDX, theDY, theDZ Directions of extrusion.
3342         #  @param theScaleFactor Use it to make prism with scaled second base.
3343         #                        Nagative value means not scaled second base.
3344         #  @param theName Object name; when specified, this parameter is used
3345         #         for result publication in the study. Otherwise, if automatic
3346         #         publication is switched on, default value is used for result name.
3347         #
3348         #  @return New GEOM.GEOM_Object, containing the created prism.
3349         #
3350         #  @ref tui_creation_prism "Example"
3351         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3352             """
3353             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3354
3355             Parameters:
3356                 theBase Base shape to be extruded.
3357                 theDX, theDY, theDZ Directions of extrusion.
3358                 theScaleFactor Use it to make prism with scaled second base.
3359                                Nagative value means not scaled second base.
3360                 theName Object name; when specified, this parameter is used
3361                         for result publication in the study. Otherwise, if automatic
3362                         publication is switched on, default value is used for result name.
3363
3364             Returns: 
3365                 New GEOM.GEOM_Object, containing the created prism.
3366             """
3367             # Example: see GEOM_TestAll.py
3368             anObj = None
3369             Parameters = ""
3370             if theScaleFactor > 0:
3371                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3372                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3373             else:
3374                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3375                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3376             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3377             anObj.SetParameters(Parameters)
3378             self._autoPublish(anObj, theName, "prism")
3379             return anObj
3380
3381         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3382         #  i.e. all the space, transfixed by the base shape during its translation
3383         #  along the vector on the given distance in 2 Ways (forward/backward).
3384         #  @param theBase Base shape to be extruded.
3385         #  @param theDX, theDY, theDZ Directions of extrusion.
3386         #  @param theName Object name; when specified, this parameter is used
3387         #         for result publication in the study. Otherwise, if automatic
3388         #         publication is switched on, default value is used for result name.
3389         #
3390         #  @return New GEOM.GEOM_Object, containing the created prism.
3391         #
3392         #  @ref tui_creation_prism "Example"
3393         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3394             """
3395             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3396             i.e. all the space, transfixed by the base shape during its translation
3397             along the vector on the given distance in 2 Ways (forward/backward).
3398
3399             Parameters:
3400                 theBase Base shape to be extruded.
3401                 theDX, theDY, theDZ Directions of extrusion.
3402                 theName Object name; when specified, this parameter is used
3403                         for result publication in the study. Otherwise, if automatic
3404                         publication is switched on, default value is used for result name.
3405
3406             Returns:
3407                 New GEOM.GEOM_Object, containing the created prism.
3408             """
3409             # Example: see GEOM_TestAll.py
3410             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3411             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3412             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3413             anObj.SetParameters(Parameters)
3414             self._autoPublish(anObj, theName, "prism")
3415             return anObj
3416
3417         ## Create a shape by revolution of the base shape around the axis
3418         #  on the given angle, i.e. all the space, transfixed by the base
3419         #  shape during its rotation around the axis on the given angle.
3420         #  @param theBase Base shape to be rotated.
3421         #  @param theAxis Rotation axis.
3422         #  @param theAngle Rotation angle in radians.
3423         #  @param theName Object name; when specified, this parameter is used
3424         #         for result publication in the study. Otherwise, if automatic
3425         #         publication is switched on, default value is used for result name.
3426         #
3427         #  @return New GEOM.GEOM_Object, containing the created revolution.
3428         #
3429         #  @ref tui_creation_revolution "Example"
3430         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3431             """
3432             Create a shape by revolution of the base shape around the axis
3433             on the given angle, i.e. all the space, transfixed by the base
3434             shape during its rotation around the axis on the given angle.
3435
3436             Parameters:
3437                 theBase Base shape to be rotated.
3438                 theAxis Rotation axis.
3439                 theAngle Rotation angle in radians.
3440                 theName Object name; when specified, this parameter is used
3441                         for result publication in the study. Otherwise, if automatic
3442                         publication is switched on, default value is used for result name.
3443
3444             Returns: 
3445                 New GEOM.GEOM_Object, containing the created revolution.
3446             """
3447             # Example: see GEOM_TestAll.py
3448             theAngle,Parameters = ParseParameters(theAngle)
3449             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3450             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3451             anObj.SetParameters(Parameters)
3452             self._autoPublish(anObj, theName, "revolution")
3453             return anObj
3454
3455         ## Create a shape by revolution of the base shape around the axis
3456         #  on the given angle, i.e. all the space, transfixed by the base
3457         #  shape during its rotation around the axis on the given angle in
3458         #  both directions (forward/backward)
3459         #  @param theBase Base shape to be rotated.
3460         #  @param theAxis Rotation axis.
3461         #  @param theAngle Rotation angle in radians.
3462         #  @param theName Object name; when specified, this parameter is used
3463         #         for result publication in the study. Otherwise, if automatic
3464         #         publication is switched on, default value is used for result name.
3465         #
3466         #  @return New GEOM.GEOM_Object, containing the created revolution.
3467         #
3468         #  @ref tui_creation_revolution "Example"
3469         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3470             """
3471             Create a shape by revolution of the base shape around the axis
3472             on the given angle, i.e. all the space, transfixed by the base
3473             shape during its rotation around the axis on the given angle in
3474             both directions (forward/backward).
3475
3476             Parameters:
3477                 theBase Base shape to be rotated.
3478                 theAxis Rotation axis.
3479                 theAngle Rotation angle in radians.
3480                 theName Object name; when specified, this parameter is used
3481                         for result publication in the study. Otherwise, if automatic
3482                         publication is switched on, default value is used for result name.
3483
3484             Returns: 
3485                 New GEOM.GEOM_Object, containing the created revolution.
3486             """
3487             theAngle,Parameters = ParseParameters(theAngle)
3488             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3489             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3490             anObj.SetParameters(Parameters)
3491             self._autoPublish(anObj, theName, "revolution")
3492             return anObj
3493
3494         ## Create a filling from the given compound of contours.
3495         #  @param theShape the compound of contours
3496         #  @param theMinDeg a minimal degree of BSpline surface to create
3497         #  @param theMaxDeg a maximal degree of BSpline surface to create
3498         #  @param theTol2D a 2d tolerance to be reached
3499         #  @param theTol3D a 3d tolerance to be reached
3500         #  @param theNbIter a number of iteration of approximation algorithm
3501         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3502         #  @param isApprox if True, BSpline curves are generated in the process
3503         #                  of surface construction. By default it is False, that means
3504         #                  the surface is created using given curves. The usage of
3505         #                  Approximation makes the algorithm work slower, but allows
3506         #                  building the surface for rather complex cases.
3507         #  @param theName Object name; when specified, this parameter is used
3508         #         for result publication in the study. Otherwise, if automatic
3509         #         publication is switched on, default value is used for result name.
3510         #
3511         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3512         #
3513         #  @ref tui_creation_filling "Example"
3514         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3515                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3516             """
3517             Create a filling from the given compound of contours.
3518
3519             Parameters:
3520                 theShape the compound of contours
3521                 theMinDeg a minimal degree of BSpline surface to create
3522                 theMaxDeg a maximal degree of BSpline surface to create
3523                 theTol2D a 2d tolerance to be reached
3524                 theTol3D a 3d tolerance to be reached
3525                 theNbIter a number of iteration of approximation algorithm
3526                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3527                 isApprox if True, BSpline curves are generated in the process
3528                          of surface construction. By default it is False, that means
3529                          the surface is created using given curves. The usage of
3530                          Approximation makes the algorithm work slower, but allows
3531                          building the surface for rather complex cases
3532                 theName Object name; when specified, this parameter is used
3533                         for result publication in the study. Otherwise, if automatic
3534                         publication is switched on, default value is used for result name.
3535
3536             Returns: 
3537                 New GEOM.GEOM_Object, containing the created filling surface.
3538
3539             Example of usage:
3540                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3541             """
3542             # Example: see GEOM_TestAll.py
3543             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3544             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3545                                             theTol2D, theTol3D, theNbIter,
3546                                             theMethod, isApprox)
3547             RaiseIfFailed("MakeFilling", self.PrimOp)
3548             anObj.SetParameters(Parameters)
3549             self._autoPublish(anObj, theName, "filling")
3550             return anObj
3551
3552
3553         ## Create a filling from the given compound of contours.
3554         #  This method corresponds to MakeFilling with isApprox=True
3555         #  @param theShape the compound of contours
3556         #  @param theMinDeg a minimal degree of BSpline surface to create
3557         #  @param theMaxDeg a maximal degree of BSpline surface to create
3558         #  @param theTol3D a 3d tolerance to be reached
3559         #  @param theName Object name; when specified, this parameter is used
3560         #         for result publication in the study. Otherwise, if automatic
3561         #         publication is switched on, default value is used for result name.
3562         #
3563         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3564         #
3565         #  @ref tui_creation_filling "Example"
3566         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3567             """
3568             Create a filling from the given compound of contours.
3569             This method corresponds to MakeFilling with isApprox=True
3570
3571             Parameters:
3572                 theShape the compound of contours
3573                 theMinDeg a minimal degree of BSpline surface to create
3574                 theMaxDeg a maximal degree of BSpline surface to create
3575                 theTol3D a 3d tolerance to be reached
3576                 theName Object name; when specified, this parameter is used
3577                         for result publication in the study. Otherwise, if automatic
3578                         publication is switched on, default value is used for result name.
3579
3580             Returns: 
3581                 New GEOM.GEOM_Object, containing the created filling surface.
3582
3583             Example of usage:
3584                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3585             """
3586             # Example: see GEOM_TestAll.py
3587             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3588             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3589                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3590             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3591             anObj.SetParameters(Parameters)
3592             self._autoPublish(anObj, theName, "filling")
3593             return anObj
3594
3595         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3596         #  @param theSeqSections - set of specified sections.
3597         #  @param theModeSolid - mode defining building solid or shell
3598         #  @param thePreci - precision 3D used for smoothing
3599         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3600         #  @param theName Object name; when specified, this parameter is used
3601         #         for result publication in the study. Otherwise, if automatic
3602         #         publication is switched on, default value is used for result name.
3603         #
3604         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3605         #
3606         #  @ref swig_todo "Example"
3607         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3608             """
3609             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3610
3611             Parameters:
3612                 theSeqSections - set of specified sections.
3613                 theModeSolid - mode defining building solid or shell
3614                 thePreci - precision 3D used for smoothing
3615                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3616                 theName Object name; when specified, this parameter is used
3617                         for result publication in the study. Otherwise, if automatic
3618                         publication is switched on, default value is used for result name.
3619
3620             Returns:
3621                 New GEOM.GEOM_Object, containing the created shell or solid.
3622             """
3623             # Example: see GEOM_TestAll.py
3624             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3625             RaiseIfFailed("MakeThruSections", self.PrimOp)
3626             self._autoPublish(anObj, theName, "filling")
3627             return anObj
3628
3629         ## Create a shape by extrusion of the base shape along
3630         #  the path shape. The path shape can be a wire or an edge.
3631         #  @param theBase Base shape to be extruded.
3632         #  @param thePath Path shape to extrude the base shape along it.
3633         #  @param theName Object name; when specified, this parameter is used
3634         #         for result publication in the study. Otherwise, if automatic
3635         #         publication is switched on, default value is used for result name.
3636         #
3637         #  @return New GEOM.GEOM_Object, containing the created pipe.
3638         #
3639         #  @ref tui_creation_pipe "Example"
3640         def MakePipe(self, theBase, thePath, theName=None):
3641             """
3642             Create a shape by extrusion of the base shape along
3643             the path shape. The path shape can be a wire or an edge.
3644
3645             Parameters:
3646                 theBase Base shape to be extruded.
3647                 thePath Path shape to extrude the base shape along it.
3648                 theName Object name; when specified, this parameter is used
3649                         for result publication in the study. Otherwise, if automatic
3650                         publication is switched on, default value is used for result name.
3651
3652             Returns:
3653                 New GEOM.GEOM_Object, containing the created pipe.
3654             """
3655             # Example: see GEOM_TestAll.py
3656             anObj = self.PrimOp.MakePipe(theBase, thePath)
3657             RaiseIfFailed("MakePipe", self.PrimOp)
3658             self._autoPublish(anObj, theName, "pipe")
3659             return anObj
3660
3661         ## Create a shape by extrusion of the profile shape along
3662         #  the path shape. The path shape can be a wire or an edge.
3663         #  the several profiles can be specified in the several locations of path.
3664         #  @param theSeqBases - list of  Bases shape to be extruded.
3665         #  @param theLocations - list of locations on the path corresponding
3666         #                        specified list of the Bases shapes. Number of locations
3667         #                        should be equal to number of bases or list of locations can be empty.
3668         #  @param thePath - Path shape to extrude the base shape along it.
3669         #  @param theWithContact - the mode defining that the section is translated to be in
3670         #                          contact with the spine.
3671         #  @param theWithCorrection - defining that the section is rotated to be
3672         #                             orthogonal to the spine tangent in the correspondent point
3673         #  @param theName Object name; when specified, this parameter is used
3674         #         for result publication in the study. Otherwise, if automatic
3675         #         publication is switched on, default value is used for result name.
3676         #
3677         #  @return New GEOM.GEOM_Object, containing the created pipe.
3678         #
3679         #  @ref tui_creation_pipe_with_diff_sec "Example"
3680         def MakePipeWithDifferentSections(self, theSeqBases,
3681                                           theLocations, thePath,
3682                                           theWithContact, theWithCorrection, theName=None):
3683             """
3684             Create a shape by extrusion of the profile shape along
3685             the path shape. The path shape can be a wire or an edge.
3686             the several profiles can be specified in the several locations of path.
3687
3688             Parameters:
3689                 theSeqBases - list of  Bases shape to be extruded.
3690                 theLocations - list of locations on the path corresponding
3691                                specified list of the Bases shapes. Number of locations
3692                                should be equal to number of bases or list of locations can be empty.
3693                 thePath - Path shape to extrude the base shape along it.
3694                 theWithContact - the mode defining that the section is translated to be in
3695                                  contact with the spine(0/1)
3696                 theWithCorrection - defining that the section is rotated to be
3697                                     orthogonal to the spine tangent in the correspondent point (0/1)
3698                 theName Object name; when specified, this parameter is used
3699                         for result publication in the study. Otherwise, if automatic
3700                         publication is switched on, default value is used for result name.
3701
3702             Returns:
3703                 New GEOM.GEOM_Object, containing the created pipe.
3704             """
3705             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3706                                                               theLocations, thePath,
3707                                                               theWithContact, theWithCorrection)
3708             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3709             self._autoPublish(anObj, theName, "pipe")
3710             return anObj
3711
3712         ## Create a shape by extrusion of the profile shape along
3713         #  the path shape. The path shape can be a wire or a edge.
3714         #  the several profiles can be specified in the several locations of path.
3715         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3716         #                       shell or face. If number of faces in neighbour sections
3717         #                       aren't coincided result solid between such sections will
3718         #                       be created using external boundaries of this shells.
3719         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3720         #                          This list is used for searching correspondences between
3721         #                          faces in the sections. Size of this list must be equal
3722         #                          to size of list of base shapes.
3723         #  @param theLocations - list of locations on the path corresponding
3724         #                        specified list of the Bases shapes. Number of locations
3725         #                        should be equal to number of bases. First and last
3726         #                        locations must be coincided with first and last vertexes
3727         #                        of path correspondingly.
3728         #  @param thePath - Path shape to extrude the base shape along it.
3729         #  @param theWithContact - the mode defining that the section is translated to be in
3730         #                          contact with the spine.
3731         #  @param theWithCorrection - defining that the section is rotated to be
3732         #                             orthogonal to the spine tangent in the correspondent point
3733         #  @param theName Object name; when specified, this parameter is used
3734         #         for result publication in the study. Otherwise, if automatic
3735         #         publication is switched on, default value is used for result name.
3736         #
3737         #  @return New GEOM.GEOM_Object, containing the created solids.
3738         #
3739         #  @ref tui_creation_pipe_with_shell_sec "Example"
3740         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3741                                       theLocations, thePath,
3742                                       theWithContact, theWithCorrection, theName=None):
3743             """
3744             Create a shape by extrusion of the profile shape along
3745             the path shape. The path shape can be a wire or a edge.
3746             the several profiles can be specified in the several locations of path.
3747
3748             Parameters:
3749                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3750                               shell or face. If number of faces in neighbour sections
3751                               aren't coincided result solid between such sections will
3752                               be created using external boundaries of this shells.
3753                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3754                                  This list is used for searching correspondences between
3755                                  faces in the sections. Size of this list must be equal
3756                                  to size of list of base shapes.
3757                 theLocations - list of locations on the path corresponding
3758                                specified list of the Bases shapes. Number of locations
3759                                should be equal to number of bases. First and last
3760                                locations must be coincided with first and last vertexes
3761                                of path correspondingly.
3762                 thePath - Path shape to extrude the base shape along it.
3763                 theWithContact - the mode defining that the section is translated to be in
3764                                  contact with the spine (0/1)
3765                 theWithCorrection - defining that the section is rotated to be
3766                                     orthogonal to the spine tangent in the correspondent point (0/1)
3767                 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             Returns:                           
3772                 New GEOM.GEOM_Object, containing the created solids.
3773             """
3774             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3775                                                           theLocations, thePath,
3776                                                           theWithContact, theWithCorrection)
3777             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3778             self._autoPublish(anObj, theName, "pipe")
3779             return anObj
3780
3781         ## Create a shape by extrusion of the profile shape along
3782         #  the path shape. This function is used only for debug pipe
3783         #  functionality - it is a version of function MakePipeWithShellSections()
3784         #  which give a possibility to recieve information about
3785         #  creating pipe between each pair of sections step by step.
3786         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3787                                              theLocations, thePath,
3788                                              theWithContact, theWithCorrection, theName=None):
3789             """
3790             Create a shape by extrusion of the profile shape along
3791             the path shape. This function is used only for debug pipe
3792             functionality - it is a version of previous function
3793             geompy.MakePipeWithShellSections() which give a possibility to
3794             recieve information about creating pipe between each pair of
3795             sections step by step.
3796             """
3797             res = []
3798             nbsect = len(theSeqBases)
3799             nbsubsect = len(theSeqSubBases)
3800             #print "nbsect = ",nbsect
3801             for i in range(1,nbsect):
3802                 #print "  i = ",i
3803                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3804                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3805                 tmpSeqSubBases = []
3806                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3807                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3808                                                               tmpLocations, thePath,
3809                                                               theWithContact, theWithCorrection)
3810                 if self.PrimOp.IsDone() == 0:
3811                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3812                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3813                     break
3814                 else:
3815                     print "Pipe between ",i," and ",i+1," sections is OK"
3816                     res.append(anObj)
3817                     pass
3818                 pass
3819
3820             resc = self.MakeCompound(res)
3821             #resc = self.MakeSewing(res, 0.001)
3822             #print "resc: ",resc
3823             self._autoPublish(resc, theName, "pipe")
3824             return resc
3825
3826         ## Create solids between given sections
3827         #  @param theSeqBases - list of sections (shell or face).
3828         #  @param theLocations - list of corresponding vertexes
3829         #  @param theName Object name; when specified, this parameter is used
3830         #         for result publication in the study. Otherwise, if automatic
3831         #         publication is switched on, default value is used for result name.
3832         #
3833         #  @return New GEOM.GEOM_Object, containing the created solids.
3834         #
3835         #  @ref tui_creation_pipe_without_path "Example"
3836         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3837             """
3838             Create solids between given sections
3839
3840             Parameters:
3841                 theSeqBases - list of sections (shell or face).
3842                 theLocations - list of corresponding vertexes
3843                 theName Object name; when specified, this parameter is used
3844                         for result publication in the study. Otherwise, if automatic
3845                         publication is switched on, default value is used for result name.
3846
3847             Returns:
3848                 New GEOM.GEOM_Object, containing the created solids.
3849             """
3850             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3851             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3852             self._autoPublish(anObj, theName, "pipe")
3853             return anObj
3854
3855         ## Create a shape by extrusion of the base shape along
3856         #  the path shape with constant bi-normal direction along the given vector.
3857         #  The path shape can be a wire or an edge.
3858         #  @param theBase Base shape to be extruded.
3859         #  @param thePath Path shape to extrude the base shape along it.
3860         #  @param theVec Vector defines a constant binormal direction to keep the
3861         #                same angle beetween the direction and the sections
3862         #                along the sweep surface.
3863         #  @param theName Object name; when specified, this parameter is used
3864         #         for result publication in the study. Otherwise, if automatic
3865         #         publication is switched on, default value is used for result name.
3866         #
3867         #  @return New GEOM.GEOM_Object, containing the created pipe.
3868         #
3869         #  @ref tui_creation_pipe "Example"
3870         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3871             """
3872             Create a shape by extrusion of the base shape along
3873             the path shape with constant bi-normal direction along the given vector.
3874             The path shape can be a wire or an edge.
3875
3876             Parameters:
3877                 theBase Base shape to be extruded.
3878                 thePath Path shape to extrude the base shape along it.
3879                 theVec Vector defines a constant binormal direction to keep the
3880                        same angle beetween the direction and the sections
3881                        along the sweep surface.
3882                 theName Object name; when specified, this parameter is used
3883                         for result publication in the study. Otherwise, if automatic
3884                         publication is switched on, default value is used for result name.
3885
3886             Returns:              
3887                 New GEOM.GEOM_Object, containing the created pipe.
3888             """
3889             # Example: see GEOM_TestAll.py
3890             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3891             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3892             self._autoPublish(anObj, theName, "pipe")
3893             return anObj
3894               
3895         ## Makes a thick solid from a face or a shell
3896         #  @param theShape Face or Shell to be thicken
3897         #  @param theThickness Thickness of the resulting solid
3898         #  @param theName Object name; when specified, this parameter is used
3899         #         for result publication in the study. Otherwise, if automatic
3900         #         publication is switched on, default value is used for result name.
3901         #
3902         #  @return New GEOM.GEOM_Object, containing the created solid
3903         #
3904         def MakeThickSolid(self, theShape, theThickness, theName=None):
3905             """
3906             Make a thick solid from a face or a shell
3907
3908             Parameters:
3909                  theShape Face or Shell to be thicken
3910                  theThickness Thickness of the resulting solid
3911                  theName Object name; when specified, this parameter is used
3912                  for result publication in the study. Otherwise, if automatic
3913                  publication is switched on, default value is used for result name.
3914                  
3915             Returns:
3916                 New GEOM.GEOM_Object, containing the created solid
3917             """
3918             # Example: see GEOM_TestAll.py
3919             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3920             RaiseIfFailed("MakeThickening", self.PrimOp)
3921             self._autoPublish(anObj, theName, "pipe")
3922             return anObj
3923             
3924
3925         ## Modifies a face or a shell to make it a thick solid
3926         #  @param theShape Face or Shell to be thicken
3927         #  @param theThickness Thickness of the resulting solid
3928         #
3929         #  @return The modified shape
3930         #
3931         def Thicken(self, theShape, theThickness):
3932             """
3933             Modifies a face or a shell to make it a thick solid
3934
3935             Parameters:
3936                 theBase Base shape to be extruded.
3937                 thePath Path shape to extrude the base shape along it.
3938                 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             Returns:
3943                 The modified shape
3944             """
3945             # Example: see GEOM_TestAll.py
3946             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3947             RaiseIfFailed("MakeThickening", self.PrimOp)
3948             return anObj
3949
3950         ## Build a middle path of a pipe-like shape.
3951         #  The path shape can be a wire or an edge.
3952         #  @param theShape It can be closed or unclosed pipe-like shell
3953         #                  or a pipe-like solid.
3954         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3955         #                            should be wires or faces of theShape.
3956         #  @param theName Object name; when specified, this parameter is used
3957         #         for result publication in the study. Otherwise, if automatic
3958         #         publication is switched on, default value is used for result name.
3959         #
3960         #  @note It is not assumed that exact or approximate copy of theShape
3961         #        can be obtained by applying existing Pipe operation on the
3962         #        resulting "Path" wire taking theBase1 as the base - it is not
3963         #        always possible; though in some particular cases it might work
3964         #        it is not guaranteed. Thus, RestorePath function should not be
3965         #        considered as an exact reverse operation of the Pipe.
3966         #
3967         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3968         #                                source pipe's "path".
3969         #
3970         #  @ref tui_creation_pipe_path "Example"
3971         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3972             """
3973             Build a middle path of a pipe-like shape.
3974             The path shape can be a wire or an edge.
3975
3976             Parameters:
3977                 theShape It can be closed or unclosed pipe-like shell
3978                          or a pipe-like solid.
3979                 theBase1, theBase2 Two bases of the supposed pipe. This
3980                                    should be wires or faces of theShape.
3981                 theName Object name; when specified, this parameter is used
3982                         for result publication in the study. Otherwise, if automatic
3983                         publication is switched on, default value is used for result name.
3984
3985             Returns:
3986                 New GEOM_Object, containing an edge or wire that represent
3987                                  source pipe's path.
3988             """
3989             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3990             RaiseIfFailed("RestorePath", self.PrimOp)
3991             self._autoPublish(anObj, theName, "path")
3992             return anObj
3993
3994         ## Build a middle path of a pipe-like shape.
3995         #  The path shape can be a wire or an edge.
3996         #  @param theShape It can be closed or unclosed pipe-like shell
3997         #                  or a pipe-like solid.
3998         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3999         #                                should be lists of edges of theShape.
4000         #  @param theName Object name; when specified, this parameter is used
4001         #         for result publication in the study. Otherwise, if automatic
4002         #         publication is switched on, default value is used for result name.
4003         #
4004         #  @note It is not assumed that exact or approximate copy of theShape
4005         #        can be obtained by applying existing Pipe operation on the
4006         #        resulting "Path" wire taking theBase1 as the base - it is not
4007         #        always possible; though in some particular cases it might work
4008         #        it is not guaranteed. Thus, RestorePath function should not be
4009         #        considered as an exact reverse operation of the Pipe.
4010         #
4011         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4012         #                                source pipe's "path".
4013         #
4014         #  @ref tui_creation_pipe_path "Example"
4015         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4016             """
4017             Build a middle path of a pipe-like shape.
4018             The path shape can be a wire or an edge.
4019
4020             Parameters:
4021                 theShape It can be closed or unclosed pipe-like shell
4022                          or a pipe-like solid.
4023                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4024                                        should be lists of edges of theShape.
4025                 theName Object name; when specified, this parameter is used
4026                         for result publication in the study. Otherwise, if automatic
4027                         publication is switched on, default value is used for result name.
4028
4029             Returns:
4030                 New GEOM_Object, containing an edge or wire that represent
4031                                  source pipe's path.
4032             """
4033             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4034             RaiseIfFailed("RestorePath", self.PrimOp)
4035             self._autoPublish(anObj, theName, "path")
4036             return anObj
4037
4038         # end of l3_complex
4039         ## @}
4040
4041         ## @addtogroup l3_advanced
4042         ## @{
4043
4044         ## Create a linear edge with specified ends.
4045         #  @param thePnt1 Point for the first end of edge.
4046         #  @param thePnt2 Point for the second end of edge.
4047         #  @param theName Object name; when specified, this parameter is used
4048         #         for result publication in the study. Otherwise, if automatic
4049         #         publication is switched on, default value is used for result name.
4050         #
4051         #  @return New GEOM.GEOM_Object, containing the created edge.
4052         #
4053         #  @ref tui_creation_edge "Example"
4054         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4055             """
4056             Create a linear edge with specified ends.
4057
4058             Parameters:
4059                 thePnt1 Point for the first end of edge.
4060                 thePnt2 Point for the second end of edge.
4061                 theName Object name; when specified, this parameter is used
4062                         for result publication in the study. Otherwise, if automatic
4063                         publication is switched on, default value is used for result name.
4064
4065             Returns:           
4066                 New GEOM.GEOM_Object, containing the created edge.
4067             """
4068             # Example: see GEOM_TestAll.py
4069             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4070             RaiseIfFailed("MakeEdge", self.ShapesOp)
4071             self._autoPublish(anObj, theName, "edge")
4072             return anObj
4073
4074         ## Create a new edge, corresponding to the given length on the given curve.
4075         #  @param theRefCurve The referenced curve (edge).
4076         #  @param theLength Length on the referenced curve. It can be negative.
4077         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4078         #                       at the end of \a theRefCurve, close to the selected point.
4079         #                       If None, start from the first point of \a theRefCurve.
4080         #  @param theName Object name; when specified, this parameter is used
4081         #         for result publication in the study. Otherwise, if automatic
4082         #         publication is switched on, default value is used for result name.
4083         #
4084         #  @return New GEOM.GEOM_Object, containing the created edge.
4085         #
4086         #  @ref tui_creation_edge "Example"
4087         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4088             """
4089             Create a new edge, corresponding to the given length on the given curve.
4090
4091             Parameters:
4092                 theRefCurve The referenced curve (edge).
4093                 theLength Length on the referenced curve. It can be negative.
4094                 theStartPoint Any point can be selected for it, the new edge will begin
4095                               at the end of theRefCurve, close to the selected point.
4096                               If None, start from the first point of theRefCurve.
4097                 theName Object name; when specified, this parameter is used
4098                         for result publication in the study. Otherwise, if automatic
4099                         publication is switched on, default value is used for result name.
4100
4101             Returns:              
4102                 New GEOM.GEOM_Object, containing the created edge.
4103             """
4104             # Example: see GEOM_TestAll.py
4105             theLength, Parameters = ParseParameters(theLength)
4106             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4107             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4108             anObj.SetParameters(Parameters)
4109             self._autoPublish(anObj, theName, "edge")
4110             return anObj
4111
4112         ## Create an edge from specified wire.
4113         #  @param theWire source Wire
4114         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4115         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4116         #  @param theName Object name; when specified, this parameter is used
4117         #         for result publication in the study. Otherwise, if automatic
4118         #         publication is switched on, default value is used for result name.
4119         #
4120         #  @return New GEOM.GEOM_Object, containing the created edge.
4121         #
4122         #  @ref tui_creation_edge "Example"
4123         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4124             """
4125             Create an edge from specified wire.
4126
4127             Parameters:
4128                 theWire source Wire
4129                 theLinearTolerance linear tolerance value (default = 1e-07)
4130                 theAngularTolerance angular tolerance value (default = 1e-12)
4131                 theName Object name; when specified, this parameter is used
4132                         for result publication in the study. Otherwise, if automatic
4133                         publication is switched on, default value is used for result name.
4134
4135             Returns:
4136                 New GEOM.GEOM_Object, containing the created edge.
4137             """
4138             # Example: see GEOM_TestAll.py
4139             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4140             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4141             self._autoPublish(anObj, theName, "edge")
4142             return anObj
4143
4144         ## Create a wire from the set of edges and wires.
4145         #  @param theEdgesAndWires List of edges and/or wires.
4146         #  @param theTolerance Maximum distance between vertices, that will be merged.
4147         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4148         #  @param theName Object name; when specified, this parameter is used
4149         #         for result publication in the study. Otherwise, if automatic
4150         #         publication is switched on, default value is used for result name.
4151         #
4152         #  @return New GEOM.GEOM_Object, containing the created wire.
4153         #
4154         #  @ref tui_creation_wire "Example"
4155         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4156             """
4157             Create a wire from the set of edges and wires.
4158
4159             Parameters:
4160                 theEdgesAndWires List of edges and/or wires.
4161                 theTolerance Maximum distance between vertices, that will be merged.
4162                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4163                 theName Object name; when specified, this parameter is used
4164                         for result publication in the study. Otherwise, if automatic
4165                         publication is switched on, default value is used for result name.
4166
4167             Returns:                    
4168                 New GEOM.GEOM_Object, containing the created wire.
4169             """
4170             # Example: see GEOM_TestAll.py
4171             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4172             RaiseIfFailed("MakeWire", self.ShapesOp)
4173             self._autoPublish(anObj, theName, "wire")
4174             return anObj
4175
4176         ## Create a face on the given wire.
4177         #  @param theWire closed Wire or Edge to build the face on.
4178         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4179         #                        If the tolerance of the obtained planar face is less
4180         #                        than 1e-06, this face will be returned, otherwise the
4181         #                        algorithm tries to build any suitable face on the given
4182         #                        wire and prints a warning message.
4183         #  @param theName Object name; when specified, this parameter is used
4184         #         for result publication in the study. Otherwise, if automatic
4185         #         publication is switched on, default value is used for result name.
4186         #
4187         #  @return New GEOM.GEOM_Object, containing the created face.
4188         #
4189         #  @ref tui_creation_face "Example"
4190         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4191             """
4192             Create a face on the given wire.
4193
4194             Parameters:
4195                 theWire closed Wire or Edge to build the face on.
4196                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4197                                If the tolerance of the obtained planar face is less
4198                                than 1e-06, this face will be returned, otherwise the
4199                                algorithm tries to build any suitable face on the given
4200                                wire and prints a warning message.
4201                 theName Object name; when specified, this parameter is used
4202                         for result publication in the study. Otherwise, if automatic
4203                         publication is switched on, default value is used for result name.
4204
4205             Returns:
4206                 New GEOM.GEOM_Object, containing the created face.
4207             """
4208             # Example: see GEOM_TestAll.py
4209             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4210             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4211                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4212             else:
4213                 RaiseIfFailed("MakeFace", self.ShapesOp)
4214             self._autoPublish(anObj, theName, "face")
4215             return anObj
4216
4217         ## Create a face on the given wires set.
4218         #  @param theWires List of closed wires or edges to build the face on.
4219         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4220         #                        If the tolerance of the obtained planar face is less
4221         #                        than 1e-06, this face will be returned, otherwise the
4222         #                        algorithm tries to build any suitable face on the given
4223         #                        wire and prints a warning message.
4224         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created face.
4229         #
4230         #  @ref tui_creation_face "Example"
4231         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4232             """
4233             Create a face on the given wires set.
4234
4235             Parameters:
4236                 theWires List of closed wires or edges to build the face on.
4237                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4238                                If the tolerance of the obtained planar face is less
4239                                than 1e-06, this face will be returned, otherwise the
4240                                algorithm tries to build any suitable face on the given
4241                                wire and prints a warning message.
4242                 theName Object name; when specified, this parameter is used
4243                         for result publication in the study. Otherwise, if automatic
4244                         publication is switched on, default value is used for result name.
4245
4246             Returns: 
4247                 New GEOM.GEOM_Object, containing the created face.
4248             """
4249             # Example: see GEOM_TestAll.py
4250             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4251             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4252                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4253             else:
4254                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4255             self._autoPublish(anObj, theName, "face")
4256             return anObj
4257
4258         ## See MakeFaceWires() method for details.
4259         #
4260         #  @ref tui_creation_face "Example 1"
4261         #  \n @ref swig_MakeFaces  "Example 2"
4262         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4263             """
4264             See geompy.MakeFaceWires() method for details.
4265             """
4266             # Example: see GEOM_TestOthers.py
4267             # note: auto-publishing is done in self.MakeFaceWires()
4268             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4269             return anObj
4270
4271         ## Create a shell from the set of faces and shells.
4272         #  @param theFacesAndShells List of faces and/or shells.
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 shell.
4278         #
4279         #  @ref tui_creation_shell "Example"
4280         def MakeShell(self, theFacesAndShells, theName=None):
4281             """
4282             Create a shell from the set of faces and shells.
4283
4284             Parameters:
4285                 theFacesAndShells List of faces and/or shells.
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 shell.
4292             """
4293             # Example: see GEOM_TestAll.py
4294             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4295             RaiseIfFailed("MakeShell", self.ShapesOp)
4296             self._autoPublish(anObj, theName, "shell")
4297             return anObj
4298
4299         ## Create a solid, bounded by the given shells.
4300         #  @param theShells Sequence of bounding shells.
4301         #  @param theName Object name; when specified, this parameter is used
4302         #         for result publication in the study. Otherwise, if automatic
4303         #         publication is switched on, default value is used for result name.
4304         #
4305         #  @return New GEOM.GEOM_Object, containing the created solid.
4306         #
4307         #  @ref tui_creation_solid "Example"
4308         def MakeSolid(self, theShells, theName=None):
4309             """
4310             Create a solid, bounded by the given shells.
4311
4312             Parameters:
4313                 theShells Sequence of bounding shells.
4314                 theName Object name; when specified, this parameter is used
4315                         for result publication in the study. Otherwise, if automatic
4316                         publication is switched on, default value is used for result name.
4317
4318             Returns:
4319                 New GEOM.GEOM_Object, containing the created solid.
4320             """
4321             # Example: see GEOM_TestAll.py
4322             if len(theShells) == 1:
4323                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4324                 #if len(descr) > 0:
4325                 #    raise RuntimeError, "MakeSolidShells : " + descr
4326                 if descr == "WRN_SHAPE_UNCLOSED":
4327                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4328             anObj = self.ShapesOp.MakeSolidShells(theShells)
4329             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4330             self._autoPublish(anObj, theName, "solid")
4331             return anObj
4332
4333         ## Create a compound of the given shapes.
4334         #  @param theShapes List of shapes to put in compound.
4335         #  @param theName Object name; when specified, this parameter is used
4336         #         for result publication in the study. Otherwise, if automatic
4337         #         publication is switched on, default value is used for result name.
4338         #
4339         #  @return New GEOM.GEOM_Object, containing the created compound.
4340         #
4341         #  @ref tui_creation_compound "Example"
4342         def MakeCompound(self, theShapes, theName=None):
4343             """
4344             Create a compound of the given shapes.
4345
4346             Parameters:
4347                 theShapes List of shapes to put in compound.
4348                 theName Object name; when specified, this parameter is used
4349                         for result publication in the study. Otherwise, if automatic
4350                         publication is switched on, default value is used for result name.
4351
4352             Returns:
4353                 New GEOM.GEOM_Object, containing the created compound.
4354             """
4355             # Example: see GEOM_TestAll.py
4356             self.ShapesOp.StartOperation()
4357             anObj = self.ShapesOp.MakeCompound(theShapes)
4358             RaiseIfFailed("MakeCompound", self.ShapesOp)
4359             self._autoPublish(anObj, theName, "compound")
4360             return anObj
4361
4362         # end of l3_advanced
4363         ## @}
4364
4365         ## @addtogroup l2_measure
4366         ## @{
4367
4368         ## Gives quantity of faces in the given shape.
4369         #  @param theShape Shape to count faces of.
4370         #  @return Quantity of faces.
4371         #
4372         #  @ref swig_NumberOf "Example"
4373         def NumberOfFaces(self, theShape):
4374             """
4375             Gives quantity of faces in the given shape.
4376
4377             Parameters:
4378                 theShape Shape to count faces of.
4379
4380             Returns:    
4381                 Quantity of faces.
4382             """
4383             # Example: see GEOM_TestOthers.py
4384             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4385             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4386             return nb_faces
4387
4388         ## Gives quantity of edges in the given shape.
4389         #  @param theShape Shape to count edges of.
4390         #  @return Quantity of edges.
4391         #
4392         #  @ref swig_NumberOf "Example"
4393         def NumberOfEdges(self, theShape):
4394             """
4395             Gives quantity of edges in the given shape.
4396
4397             Parameters:
4398                 theShape Shape to count edges of.
4399
4400             Returns:    
4401                 Quantity of edges.
4402             """
4403             # Example: see GEOM_TestOthers.py
4404             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4405             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4406             return nb_edges
4407
4408         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4409         #  @param theShape Shape to count sub-shapes of.
4410         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4411         #  @return Quantity of sub-shapes of given type.
4412         #
4413         #  @ref swig_NumberOf "Example"
4414         def NumberOfSubShapes(self, theShape, theShapeType):
4415             """
4416             Gives quantity of sub-shapes of type theShapeType in the given shape.
4417
4418             Parameters:
4419                 theShape Shape to count sub-shapes of.
4420                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4421
4422             Returns:
4423                 Quantity of sub-shapes of given type.
4424             """
4425             # Example: see GEOM_TestOthers.py
4426             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4427             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4428             return nb_ss
4429
4430         ## Gives quantity of solids in the given shape.
4431         #  @param theShape Shape to count solids in.
4432         #  @return Quantity of solids.
4433         #
4434         #  @ref swig_NumberOf "Example"
4435         def NumberOfSolids(self, theShape):
4436             """
4437             Gives quantity of solids in the given shape.
4438
4439             Parameters:
4440                 theShape Shape to count solids in.
4441
4442             Returns:
4443                 Quantity of solids.
4444             """
4445             # Example: see GEOM_TestOthers.py
4446             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4447             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4448             return nb_solids
4449
4450         # end of l2_measure
4451         ## @}
4452
4453         ## @addtogroup l3_healing
4454         ## @{
4455
4456         ## Reverses an orientation the given shape.
4457         #  @param theShape Shape to be reversed.
4458         #  @param theName Object name; when specified, this parameter is used
4459         #         for result publication in the study. Otherwise, if automatic
4460         #         publication is switched on, default value is used for result name.
4461         #
4462         #  @return The reversed copy of theShape.
4463         #
4464         #  @ref swig_ChangeOrientation "Example"
4465         def ChangeOrientation(self, theShape, theName=None):
4466             """
4467             Reverses an orientation the given shape.
4468
4469             Parameters:
4470                 theShape Shape to be reversed.
4471                 theName Object name; when specified, this parameter is used
4472                         for result publication in the study. Otherwise, if automatic
4473                         publication is switched on, default value is used for result name.
4474
4475             Returns:   
4476                 The reversed copy of theShape.
4477             """
4478             # Example: see GEOM_TestAll.py
4479             anObj = self.ShapesOp.ChangeOrientation(theShape)
4480             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4481             self._autoPublish(anObj, theName, "reversed")
4482             return anObj
4483
4484         ## See ChangeOrientation() method for details.
4485         #
4486         #  @ref swig_OrientationChange "Example"
4487         def OrientationChange(self, theShape, theName=None):
4488             """
4489             See geompy.ChangeOrientation method for details.
4490             """
4491             # Example: see GEOM_TestOthers.py
4492             # note: auto-publishing is done in self.ChangeOrientation()
4493             anObj = self.ChangeOrientation(theShape, theName)
4494             return anObj
4495
4496         # end of l3_healing
4497         ## @}
4498
4499         ## @addtogroup l4_obtain
4500         ## @{
4501
4502         ## Retrieve all free faces from the given shape.
4503         #  Free face is a face, which is not shared between two shells of the shape.
4504         #  @param theShape Shape to find free faces in.
4505         #  @return List of IDs of all free faces, contained in theShape.
4506         #
4507         #  @ref tui_measurement_tools_page "Example"
4508         def GetFreeFacesIDs(self,theShape):
4509             """
4510             Retrieve all free faces from the given shape.
4511             Free face is a face, which is not shared between two shells of the shape.
4512
4513             Parameters:
4514                 theShape Shape to find free faces in.
4515
4516             Returns:
4517                 List of IDs of all free faces, contained in theShape.
4518             """
4519             # Example: see GEOM_TestOthers.py
4520             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4521             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4522             return anIDs
4523
4524         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4525         #  @param theShape1 Shape to find sub-shapes in.
4526         #  @param theShape2 Shape to find shared sub-shapes with.
4527         #  @param theShapeType Type of sub-shapes to be retrieved.
4528         #  @param theName Object name; when specified, this parameter is used
4529         #         for result publication in the study. Otherwise, if automatic
4530         #         publication is switched on, default value is used for result name.
4531         #
4532         #  @return List of sub-shapes of theShape1, shared with theShape2.
4533         #
4534         #  @ref swig_GetSharedShapes "Example"
4535         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4536             """
4537             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4538
4539             Parameters:
4540                 theShape1 Shape to find sub-shapes in.
4541                 theShape2 Shape to find shared sub-shapes with.
4542                 theShapeType Type of sub-shapes to be retrieved.
4543                 theName Object name; when specified, this parameter is used
4544                         for result publication in the study. Otherwise, if automatic
4545                         publication is switched on, default value is used for result name.
4546
4547             Returns:
4548                 List of sub-shapes of theShape1, shared with theShape2.
4549             """
4550             # Example: see GEOM_TestOthers.py
4551             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4552             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4553             self._autoPublish(aList, theName, "shared")
4554             return aList
4555
4556         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4557         #  @param theShapes Shapes to find common sub-shapes of.
4558         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4559         #  @param theName Object name; when specified, this parameter is used
4560         #         for result publication in the study. Otherwise, if automatic
4561         #         publication is switched on, default value is used for result name.
4562         #
4563         #  @return List of objects, that are sub-shapes of all given shapes.
4564         #
4565         #  @ref swig_GetSharedShapes "Example"
4566         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4567             """
4568             Get all sub-shapes, shared by all shapes in the list theShapes.
4569
4570             Parameters:
4571                 theShapes Shapes to find common sub-shapes of.
4572                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4573                 theName Object name; when specified, this parameter is used
4574                         for result publication in the study. Otherwise, if automatic
4575                         publication is switched on, default value is used for result name.
4576
4577             Returns:    
4578                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4579             """
4580             # Example: see GEOM_TestOthers.py
4581             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4582             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4583             self._autoPublish(aList, theName, "shared")
4584             return aList
4585
4586         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4587         #  situated relatively the specified plane by the certain way,
4588         #  defined through <VAR>theState</VAR> parameter.
4589         #  @param theShape Shape to find sub-shapes of.
4590         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4591         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4592         #                direction and location of the plane to find shapes on.
4593         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4594         #  @param theName Object name; when specified, this parameter is used
4595         #         for result publication in the study. Otherwise, if automatic
4596         #         publication is switched on, default value is used for result name.
4597         #
4598         #  @return List of all found sub-shapes.
4599         #
4600         #  @ref swig_GetShapesOnPlane "Example"
4601         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4602             """
4603             Find in theShape all sub-shapes of type theShapeType,
4604             situated relatively the specified plane by the certain way,
4605             defined through theState parameter.
4606
4607             Parameters:
4608                 theShape Shape to find sub-shapes of.
4609                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4610                 theAx1 Vector (or line, or linear edge), specifying normal
4611                        direction and location of the plane to find shapes on.
4612                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4613                 theName Object name; when specified, this parameter is used
4614                         for result publication in the study. Otherwise, if automatic
4615                         publication is switched on, default value is used for result name.
4616
4617             Returns:
4618                 List of all found sub-shapes.
4619             """
4620             # Example: see GEOM_TestOthers.py
4621             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4622             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4623             self._autoPublish(aList, theName, "shapeOnPlane")
4624             return aList
4625
4626         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4627         #  situated relatively the specified plane by the certain way,
4628         #  defined through <VAR>theState</VAR> parameter.
4629         #  @param theShape Shape to find sub-shapes of.
4630         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4631         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4632         #                direction and location of the plane to find shapes on.
4633         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4634         #
4635         #  @return List of all found sub-shapes indices.
4636         #
4637         #  @ref swig_GetShapesOnPlaneIDs "Example"
4638         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4639             """
4640             Find in theShape all sub-shapes of type theShapeType,
4641             situated relatively the specified plane by the certain way,
4642             defined through theState parameter.
4643
4644             Parameters:
4645                 theShape Shape to find sub-shapes of.
4646                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4647                 theAx1 Vector (or line, or linear edge), specifying normal
4648                        direction and location of the plane to find shapes on.
4649                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4650
4651             Returns:
4652                 List of all found sub-shapes indices.
4653             """
4654             # Example: see GEOM_TestOthers.py
4655             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4656             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4657             return aList
4658
4659         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4660         #  situated relatively the specified plane by the certain way,
4661         #  defined through <VAR>theState</VAR> parameter.
4662         #  @param theShape Shape to find sub-shapes of.
4663         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4664         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4665         #                direction of the plane to find shapes on.
4666         #  @param thePnt Point specifying location of the plane to find shapes on.
4667         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4668         #  @param theName Object name; when specified, this parameter is used
4669         #         for result publication in the study. Otherwise, if automatic
4670         #         publication is switched on, default value is used for result name.
4671         #
4672         #  @return List of all found sub-shapes.
4673         #
4674         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4675         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4676             """
4677             Find in theShape all sub-shapes of type theShapeType,
4678             situated relatively the specified plane by the certain way,
4679             defined through theState parameter.
4680
4681             Parameters:
4682                 theShape Shape to find sub-shapes of.
4683                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4684                 theAx1 Vector (or line, or linear edge), specifying normal
4685                        direction and location of the plane to find shapes on.
4686                 thePnt Point specifying location of the plane to find shapes on.
4687                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4688                 theName Object name; when specified, this parameter is used
4689                         for result publication in the study. Otherwise, if automatic
4690                         publication is switched on, default value is used for result name.
4691
4692             Returns:
4693                 List of all found sub-shapes.
4694             """
4695             # Example: see GEOM_TestOthers.py
4696             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4697                                                                theAx1, thePnt, theState)
4698             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4699             self._autoPublish(aList, theName, "shapeOnPlane")
4700             return aList
4701
4702         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4703         #  situated relatively the specified plane by the certain way,
4704         #  defined through <VAR>theState</VAR> parameter.
4705         #  @param theShape Shape to find sub-shapes of.
4706         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4707         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4708         #                direction of the plane to find shapes on.
4709         #  @param thePnt Point specifying location of the plane to find shapes on.
4710         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4711         #
4712         #  @return List of all found sub-shapes indices.
4713         #
4714         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4715         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4716             """
4717             Find in theShape all sub-shapes of type theShapeType,
4718             situated relatively the specified plane by the certain way,
4719             defined through theState parameter.
4720
4721             Parameters:
4722                 theShape Shape to find sub-shapes of.
4723                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4724                 theAx1 Vector (or line, or linear edge), specifying normal
4725                        direction and location of the plane to find shapes on.
4726                 thePnt Point specifying location of the plane to find shapes on.
4727                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4728
4729             Returns:
4730                 List of all found sub-shapes indices.
4731             """
4732             # Example: see GEOM_TestOthers.py
4733             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4734                                                                   theAx1, thePnt, theState)
4735             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4736             return aList
4737
4738         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4739         #  the specified cylinder by the certain way, defined through \a theState parameter.
4740         #  @param theShape Shape to find sub-shapes of.
4741         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4742         #  @param theAxis Vector (or line, or linear edge), specifying
4743         #                 axis of the cylinder to find shapes on.
4744         #  @param theRadius Radius of the cylinder to find shapes on.
4745         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4746         #  @param theName Object name; when specified, this parameter is used
4747         #         for result publication in the study. Otherwise, if automatic
4748         #         publication is switched on, default value is used for result name.
4749         #
4750         #  @return List of all found sub-shapes.
4751         #
4752         #  @ref swig_GetShapesOnCylinder "Example"
4753         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4754             """
4755             Find in theShape all sub-shapes of type theShapeType, situated relatively
4756             the specified cylinder by the certain way, defined through theState parameter.
4757
4758             Parameters:
4759                 theShape Shape to find sub-shapes of.
4760                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4761                 theAxis Vector (or line, or linear edge), specifying
4762                         axis of the cylinder to find shapes on.
4763                 theRadius Radius of the cylinder to find shapes on.
4764                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4765                 theName Object name; when specified, this parameter is used
4766                         for result publication in the study. Otherwise, if automatic
4767                         publication is switched on, default value is used for result name.
4768
4769             Returns:
4770                 List of all found sub-shapes.
4771             """
4772             # Example: see GEOM_TestOthers.py
4773             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4774             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4775             self._autoPublish(aList, theName, "shapeOnCylinder")
4776             return aList
4777
4778         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4779         #  the specified cylinder by the certain way, defined through \a theState parameter.
4780         #  @param theShape Shape to find sub-shapes of.
4781         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4782         #  @param theAxis Vector (or line, or linear edge), specifying
4783         #                 axis of the cylinder to find shapes on.
4784         #  @param theRadius Radius of the cylinder to find shapes on.
4785         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4786         #
4787         #  @return List of all found sub-shapes indices.
4788         #
4789         #  @ref swig_GetShapesOnCylinderIDs "Example"
4790         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4791             """
4792             Find in theShape all sub-shapes of type theShapeType, situated relatively
4793             the specified cylinder by the certain way, defined through theState parameter.
4794
4795             Parameters:
4796                 theShape Shape to find sub-shapes of.
4797                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4798                 theAxis Vector (or line, or linear edge), specifying
4799                         axis of the cylinder to find shapes on.
4800                 theRadius Radius of the cylinder to find shapes on.
4801                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4802
4803             Returns:
4804                 List of all found sub-shapes indices.
4805             """
4806             # Example: see GEOM_TestOthers.py
4807             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4808             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4809             return aList
4810
4811         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4812         #  the specified cylinder by the certain way, defined through \a theState parameter.
4813         #  @param theShape Shape to find sub-shapes of.
4814         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4815         #  @param theAxis Vector (or line, or linear edge), specifying
4816         #                 axis of the cylinder to find shapes on.
4817         #  @param thePnt Point specifying location of the bottom of the cylinder.
4818         #  @param theRadius Radius of the cylinder to find shapes on.
4819         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4820         #  @param theName Object name; when specified, this parameter is used
4821         #         for result publication in the study. Otherwise, if automatic
4822         #         publication is switched on, default value is used for result name.
4823         #
4824         #  @return List of all found sub-shapes.
4825         #
4826         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4827         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4828             """
4829             Find in theShape all sub-shapes of type theShapeType, situated relatively
4830             the specified cylinder by the certain way, defined through theState parameter.
4831
4832             Parameters:
4833                 theShape Shape to find sub-shapes of.
4834                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4835                 theAxis Vector (or line, or linear edge), specifying
4836                         axis of the cylinder to find shapes on.
4837                 theRadius Radius of the cylinder to find shapes on.
4838                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4839                 theName Object name; when specified, this parameter is used
4840                         for result publication in the study. Otherwise, if automatic
4841                         publication is switched on, default value is used for result name.
4842
4843             Returns:
4844                 List of all found sub-shapes.
4845             """
4846             # Example: see GEOM_TestOthers.py
4847             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4848             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4849             self._autoPublish(aList, theName, "shapeOnCylinder")
4850             return aList
4851
4852         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4853         #  the specified cylinder by the certain way, defined through \a theState parameter.
4854         #  @param theShape Shape to find sub-shapes of.
4855         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4856         #  @param theAxis Vector (or line, or linear edge), specifying
4857         #                 axis of the cylinder to find shapes on.
4858         #  @param thePnt Point specifying location of the bottom of the cylinder.
4859         #  @param theRadius Radius of the cylinder to find shapes on.
4860         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4861         #
4862         #  @return List of all found sub-shapes indices
4863         #
4864         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4865         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4866             """
4867             Find in theShape all sub-shapes of type theShapeType, situated relatively
4868             the specified cylinder by the certain way, defined through theState parameter.
4869
4870             Parameters:
4871                 theShape Shape to find sub-shapes of.
4872                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4873                 theAxis Vector (or line, or linear edge), specifying
4874                         axis of the cylinder to find shapes on.
4875                 theRadius Radius of the cylinder to find shapes on.
4876                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4877
4878             Returns:
4879                 List of all found sub-shapes indices.            
4880             """
4881             # Example: see GEOM_TestOthers.py
4882             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4883             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4884             return aList
4885
4886         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4887         #  the specified sphere by the certain way, defined through \a theState parameter.
4888         #  @param theShape Shape to find sub-shapes of.
4889         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4890         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4891         #  @param theRadius Radius of the sphere to find shapes on.
4892         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4893         #  @param theName Object name; when specified, this parameter is used
4894         #         for result publication in the study. Otherwise, if automatic
4895         #         publication is switched on, default value is used for result name.
4896         #
4897         #  @return List of all found sub-shapes.
4898         #
4899         #  @ref swig_GetShapesOnSphere "Example"
4900         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4901             """
4902             Find in theShape all sub-shapes of type theShapeType, situated relatively
4903             the specified sphere by the certain way, defined through theState parameter.
4904
4905             Parameters:
4906                 theShape Shape to find sub-shapes of.
4907                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4908                 theCenter Point, specifying center of the sphere to find shapes on.
4909                 theRadius Radius of the sphere to find shapes on.
4910                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4911                 theName Object name; when specified, this parameter is used
4912                         for result publication in the study. Otherwise, if automatic
4913                         publication is switched on, default value is used for result name.
4914
4915             Returns:
4916                 List of all found sub-shapes.
4917             """
4918             # Example: see GEOM_TestOthers.py
4919             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4920             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4921             self._autoPublish(aList, theName, "shapeOnSphere")
4922             return aList
4923
4924         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4925         #  the specified sphere by the certain way, defined through \a theState parameter.
4926         #  @param theShape Shape to find sub-shapes of.
4927         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4928         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4929         #  @param theRadius Radius of the sphere to find shapes on.
4930         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4931         #
4932         #  @return List of all found sub-shapes indices.
4933         #
4934         #  @ref swig_GetShapesOnSphereIDs "Example"
4935         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4936             """
4937             Find in theShape all sub-shapes of type theShapeType, situated relatively
4938             the specified sphere by the certain way, defined through theState parameter.
4939
4940             Parameters:
4941                 theShape Shape to find sub-shapes of.
4942                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4943                 theCenter Point, specifying center of the sphere to find shapes on.
4944                 theRadius Radius of the sphere to find shapes on.
4945                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4946
4947             Returns:
4948                 List of all found sub-shapes indices.
4949             """
4950             # Example: see GEOM_TestOthers.py
4951             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4952             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4953             return aList
4954
4955         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4956         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4957         #  @param theShape Shape to find sub-shapes of.
4958         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4959         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4960         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4961         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4962         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4963         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4964         #  @param theName Object name; when specified, this parameter is used
4965         #         for result publication in the study. Otherwise, if automatic
4966         #         publication is switched on, default value is used for result name.
4967         #
4968         #  @return List of all found sub-shapes.
4969         #
4970         #  @ref swig_GetShapesOnQuadrangle "Example"
4971         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4972                                   theTopLeftPoint, theTopRigthPoint,
4973                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4974             """
4975             Find in theShape all sub-shapes of type theShapeType, situated relatively
4976             the specified quadrangle by the certain way, defined through theState parameter.
4977
4978             Parameters:
4979                 theShape Shape to find sub-shapes of.
4980                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4981                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4982                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4983                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4984                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4985                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4986                 theName Object name; when specified, this parameter is used
4987                         for result publication in the study. Otherwise, if automatic
4988                         publication is switched on, default value is used for result name.
4989
4990             Returns:
4991                 List of all found sub-shapes.
4992             """
4993             # Example: see GEOM_TestOthers.py
4994             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4995                                                         theTopLeftPoint, theTopRigthPoint,
4996                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4997             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4998             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4999             return aList
5000
5001         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5002         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5003         #  @param theShape Shape to find sub-shapes of.
5004         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5005         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5006         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5007         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5008         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5009         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5010         #
5011         #  @return List of all found sub-shapes indices.
5012         #
5013         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5014         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5015                                      theTopLeftPoint, theTopRigthPoint,
5016                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5017             """
5018             Find in theShape all sub-shapes of type theShapeType, situated relatively
5019             the specified quadrangle by the certain way, defined through theState parameter.
5020
5021             Parameters:
5022                 theShape Shape to find sub-shapes of.
5023                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5024                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5025                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5026                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5027                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5028                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5029
5030             Returns:
5031                 List of all found sub-shapes indices.
5032             """
5033
5034             # Example: see GEOM_TestOthers.py
5035             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5036                                                            theTopLeftPoint, theTopRigthPoint,
5037                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5038             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5039             return aList
5040
5041         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5042         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5043         #  @param theBox Shape for relative comparing.
5044         #  @param theShape Shape to find sub-shapes of.
5045         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5046         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5047         #  @param theName Object name; when specified, this parameter is used
5048         #         for result publication in the study. Otherwise, if automatic
5049         #         publication is switched on, default value is used for result name.
5050         #
5051         #  @return List of all found sub-shapes.
5052         #
5053         #  @ref swig_GetShapesOnBox "Example"
5054         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5055             """
5056             Find in theShape all sub-shapes of type theShapeType, situated relatively
5057             the specified theBox by the certain way, defined through theState parameter.
5058
5059             Parameters:
5060                 theBox Shape for relative comparing.
5061                 theShape Shape to find sub-shapes of.
5062                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5063                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5064                 theName Object name; when specified, this parameter is used
5065                         for result publication in the study. Otherwise, if automatic
5066                         publication is switched on, default value is used for result name.
5067
5068             Returns:
5069                 List of all found sub-shapes.
5070             """
5071             # Example: see GEOM_TestOthers.py
5072             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5073             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5074             self._autoPublish(aList, theName, "shapeOnBox")
5075             return aList
5076
5077         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5078         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5079         #  @param theBox Shape for relative comparing.
5080         #  @param theShape Shape to find sub-shapes of.
5081         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5082         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5083         #
5084         #  @return List of all found sub-shapes indices.
5085         #
5086         #  @ref swig_GetShapesOnBoxIDs "Example"
5087         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5088             """
5089             Find in theShape all sub-shapes of type theShapeType, situated relatively
5090             the specified theBox by the certain way, defined through theState parameter.
5091
5092             Parameters:
5093                 theBox Shape for relative comparing.
5094                 theShape Shape to find sub-shapes of.
5095                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5096                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5097
5098             Returns:
5099                 List of all found sub-shapes indices.
5100             """
5101             # Example: see GEOM_TestOthers.py
5102             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5103             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5104             return aList
5105
5106         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5107         #  situated relatively the specified \a theCheckShape by the
5108         #  certain way, defined through \a theState parameter.
5109         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5110         #  @param theShape Shape to find sub-shapes of.
5111         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5112         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5113         #  @param theName Object name; when specified, this parameter is used
5114         #         for result publication in the study. Otherwise, if automatic
5115         #         publication is switched on, default value is used for result name.
5116         #
5117         #  @return List of all found sub-shapes.
5118         #
5119         #  @ref swig_GetShapesOnShape "Example"
5120         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5121             """
5122             Find in theShape all sub-shapes of type theShapeType,
5123             situated relatively the specified theCheckShape by the
5124             certain way, defined through theState parameter.
5125
5126             Parameters:
5127                 theCheckShape Shape for relative comparing. It must be a solid.
5128                 theShape Shape to find sub-shapes of.
5129                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5130                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5131                 theName Object name; when specified, this parameter is used
5132                         for result publication in the study. Otherwise, if automatic
5133                         publication is switched on, default value is used for result name.
5134
5135             Returns:
5136                 List of all found sub-shapes.
5137             """
5138             # Example: see GEOM_TestOthers.py
5139             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5140                                                    theShapeType, theState)
5141             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5142             self._autoPublish(aList, theName, "shapeOnShape")
5143             return aList
5144
5145         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5146         #  situated relatively the specified \a theCheckShape by the
5147         #  certain way, defined through \a theState parameter.
5148         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5149         #  @param theShape Shape to find sub-shapes of.
5150         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5151         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5152         #  @param theName Object name; when specified, this parameter is used
5153         #         for result publication in the study. Otherwise, if automatic
5154         #         publication is switched on, default value is used for result name.
5155         #
5156         #  @return All found sub-shapes as compound.
5157         #
5158         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5159         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5160             """
5161             Find in theShape all sub-shapes of type theShapeType,
5162             situated relatively the specified theCheckShape by the
5163             certain way, defined through theState parameter.
5164
5165             Parameters:
5166                 theCheckShape Shape for relative comparing. It must be a solid.
5167                 theShape Shape to find sub-shapes of.
5168                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5169                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5170                 theName Object name; when specified, this parameter is used
5171                         for result publication in the study. Otherwise, if automatic
5172                         publication is switched on, default value is used for result name.
5173
5174             Returns:
5175                 All found sub-shapes as compound.
5176             """
5177             # Example: see GEOM_TestOthers.py
5178             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5179                                                              theShapeType, theState)
5180             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5181             self._autoPublish(anObj, theName, "shapeOnShape")
5182             return anObj
5183
5184         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5185         #  situated relatively the specified \a theCheckShape by the
5186         #  certain way, defined through \a theState parameter.
5187         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5188         #  @param theShape Shape to find sub-shapes of.
5189         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5190         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5191         #
5192         #  @return List of all found sub-shapes indices.
5193         #
5194         #  @ref swig_GetShapesOnShapeIDs "Example"
5195         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5196             """
5197             Find in theShape all sub-shapes of type theShapeType,
5198             situated relatively the specified theCheckShape by the
5199             certain way, defined through theState parameter.
5200
5201             Parameters:
5202                 theCheckShape Shape for relative comparing. It must be a solid.
5203                 theShape Shape to find sub-shapes of.
5204                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5205                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5206
5207             Returns:
5208                 List of all found sub-shapes indices.
5209             """
5210             # Example: see GEOM_TestOthers.py
5211             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5212                                                       theShapeType, theState)
5213             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5214             return aList
5215
5216         ## Get sub-shape(s) of theShapeWhere, which are
5217         #  coincident with \a theShapeWhat or could be a part of it.
5218         #  @param theShapeWhere Shape to find sub-shapes of.
5219         #  @param theShapeWhat Shape, specifying what to find.
5220         #  @param isNewImplementation implementation of GetInPlace functionality
5221         #             (default = False, old alghorithm based on shape properties)
5222         #  @param theName Object name; when specified, this parameter is used
5223         #         for result publication in the study. Otherwise, if automatic
5224         #         publication is switched on, default value is used for result name.
5225         #
5226         #  @return Group of all found sub-shapes or a single found sub-shape.
5227         #
5228         #  @note This function has a restriction on argument shapes.
5229         #        If \a theShapeWhere has curved parts with significantly
5230         #        outstanding centres (i.e. the mass centre of a part is closer to
5231         #        \a theShapeWhat than to the part), such parts will not be found.
5232         #        @image html get_in_place_lost_part.png
5233         #
5234         #  @ref swig_GetInPlace "Example"
5235         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5236             """
5237             Get sub-shape(s) of theShapeWhere, which are
5238             coincident with  theShapeWhat or could be a part of it.
5239
5240             Parameters:
5241                 theShapeWhere Shape to find sub-shapes of.
5242                 theShapeWhat Shape, specifying what to find.
5243                 isNewImplementation Implementation of GetInPlace functionality
5244                                     (default = False, old alghorithm based on shape properties)
5245                 theName Object name; when specified, this parameter is used
5246                         for result publication in the study. Otherwise, if automatic
5247                         publication is switched on, default value is used for result name.
5248
5249             Returns:
5250                 Group of all found sub-shapes or a single found sub-shape.
5251
5252                 
5253             Note:
5254                 This function has a restriction on argument shapes.
5255                 If theShapeWhere has curved parts with significantly
5256                 outstanding centres (i.e. the mass centre of a part is closer to
5257                 theShapeWhat than to the part), such parts will not be found.
5258             """
5259             # Example: see GEOM_TestOthers.py
5260             anObj = None
5261             if isNewImplementation:
5262                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5263             else:
5264                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5265                 pass
5266             RaiseIfFailed("GetInPlace", self.ShapesOp)
5267             self._autoPublish(anObj, theName, "inplace")
5268             return anObj
5269
5270         ## Get sub-shape(s) of \a theShapeWhere, which are
5271         #  coincident with \a theShapeWhat or could be a part of it.
5272         #
5273         #  Implementation of this method is based on a saved history of an operation,
5274         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5275         #  arguments (an argument shape or a sub-shape of an argument shape).
5276         #  The operation could be the Partition or one of boolean operations,
5277         #  performed on simple shapes (not on compounds).
5278         #
5279         #  @param theShapeWhere Shape to find sub-shapes of.
5280         #  @param theShapeWhat Shape, specifying what to find (must be in the
5281         #                      building history of the ShapeWhere).
5282         #  @param theName Object name; when specified, this parameter is used
5283         #         for result publication in the study. Otherwise, if automatic
5284         #         publication is switched on, default value is used for result name.
5285         #
5286         #  @return Group of all found sub-shapes or a single found sub-shape.
5287         #
5288         #  @ref swig_GetInPlace "Example"
5289         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5290             """
5291             Implementation of this method is based on a saved history of an operation,
5292             produced theShapeWhere. The theShapeWhat must be among this operation's
5293             arguments (an argument shape or a sub-shape of an argument shape).
5294             The operation could be the Partition or one of boolean operations,
5295             performed on simple shapes (not on compounds).
5296
5297             Parameters:
5298                 theShapeWhere Shape to find sub-shapes of.
5299                 theShapeWhat Shape, specifying what to find (must be in the
5300                                 building history of the ShapeWhere).
5301                 theName Object name; when specified, this parameter is used
5302                         for result publication in the study. Otherwise, if automatic
5303                         publication is switched on, default value is used for result name.
5304
5305             Returns:
5306                 Group of all found sub-shapes or a single found sub-shape.
5307             """
5308             # Example: see GEOM_TestOthers.py
5309             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5310             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5311             self._autoPublish(anObj, theName, "inplace")
5312             return anObj
5313
5314         ## Get sub-shape of theShapeWhere, which is
5315         #  equal to \a theShapeWhat.
5316         #  @param theShapeWhere Shape to find sub-shape of.
5317         #  @param theShapeWhat Shape, specifying what to find.
5318         #  @param theName Object name; when specified, this parameter is used
5319         #         for result publication in the study. Otherwise, if automatic
5320         #         publication is switched on, default value is used for result name.
5321         #
5322         #  @return New GEOM.GEOM_Object for found sub-shape.
5323         #
5324         #  @ref swig_GetSame "Example"
5325         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5326             """
5327             Get sub-shape of theShapeWhere, which is
5328             equal to theShapeWhat.
5329
5330             Parameters:
5331                 theShapeWhere Shape to find sub-shape of.
5332                 theShapeWhat Shape, specifying what to find.
5333                 theName Object name; when specified, this parameter is used
5334                         for result publication in the study. Otherwise, if automatic
5335                         publication is switched on, default value is used for result name.
5336
5337             Returns:
5338                 New GEOM.GEOM_Object for found sub-shape.
5339             """
5340             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5341             RaiseIfFailed("GetSame", self.ShapesOp)
5342             self._autoPublish(anObj, theName, "sameShape")
5343             return anObj
5344
5345
5346         ## Get sub-shape indices of theShapeWhere, which is
5347         #  equal to \a theShapeWhat.
5348         #  @param theShapeWhere Shape to find sub-shape of.
5349         #  @param theShapeWhat Shape, specifying what to find.
5350         #  @return List of all found sub-shapes indices. 
5351         #
5352         #  @ref swig_GetSame "Example"
5353         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5354             """
5355             Get sub-shape indices of theShapeWhere, which is
5356             equal to theShapeWhat.
5357
5358             Parameters:
5359                 theShapeWhere Shape to find sub-shape of.
5360                 theShapeWhat Shape, specifying what to find.
5361
5362             Returns:
5363                 List of all found sub-shapes indices.
5364             """
5365             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5366             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5367             return anObj
5368
5369
5370         # end of l4_obtain
5371         ## @}
5372
5373         ## @addtogroup l4_access
5374         ## @{
5375
5376         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5377         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5378         #  @param aShape Shape to get sub-shape of.
5379         #  @param ListOfID List of sub-shapes indices.
5380         #  @param theName Object name; when specified, this parameter is used
5381         #         for result publication in the study. Otherwise, if automatic
5382         #         publication is switched on, default value is used for result name.
5383         #
5384         #  @return Found sub-shape.
5385         #
5386         #  @ref swig_all_decompose "Example"
5387         def GetSubShape(self, aShape, ListOfID, theName=None):
5388             """
5389             Obtain a composite sub-shape of aShape, composed from sub-shapes
5390             of aShape, selected by their unique IDs inside aShape
5391
5392             Parameters:
5393                 aShape Shape to get sub-shape of.
5394                 ListOfID List of sub-shapes indices.
5395                 theName Object name; when specified, this parameter is used
5396                         for result publication in the study. Otherwise, if automatic
5397                         publication is switched on, default value is used for result name.
5398
5399             Returns:
5400                 Found sub-shape.
5401             """
5402             # Example: see GEOM_TestAll.py
5403             anObj = self.AddSubShape(aShape,ListOfID)
5404             self._autoPublish(anObj, theName, "subshape")
5405             return anObj
5406
5407         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5408         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5409         #  @param aShape Shape to get sub-shape of.
5410         #  @param aSubShape Sub-shapes of aShape.
5411         #  @return ID of found sub-shape.
5412         #
5413         #  @ref swig_all_decompose "Example"
5414         def GetSubShapeID(self, aShape, aSubShape):
5415             """
5416             Obtain unique ID of sub-shape aSubShape inside aShape
5417             of aShape, selected by their unique IDs inside aShape
5418
5419             Parameters:
5420                aShape Shape to get sub-shape of.
5421                aSubShape Sub-shapes of aShape.
5422
5423             Returns:
5424                ID of found sub-shape.
5425             """
5426             # Example: see GEOM_TestAll.py
5427             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5428             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5429             return anID
5430             
5431         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5432         #  This function is provided for performance purpose. The complexity is O(n) with n
5433         #  the number of subobjects of aShape
5434         #  @param aShape Shape to get sub-shape of.
5435         #  @param aSubShapes Sub-shapes of aShape.
5436         #  @return list of IDs of found sub-shapes.
5437         #
5438         #  @ref swig_all_decompose "Example"
5439         def GetSubShapesIDs(self, aShape, aSubShapes):
5440             """
5441             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5442             This function is provided for performance purpose. The complexity is O(n) with n
5443             the number of subobjects of aShape
5444
5445             Parameters:
5446                aShape Shape to get sub-shape of.
5447                aSubShapes Sub-shapes of aShape.
5448
5449             Returns:
5450                List of IDs of found sub-shape.
5451             """
5452             # Example: see GEOM_TestAll.py
5453             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5454             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5455             return anIDs
5456
5457         # end of l4_access
5458         ## @}
5459
5460         ## @addtogroup l4_decompose
5461         ## @{
5462
5463         ## Get all sub-shapes and groups of \a theShape,
5464         #  that were created already by any other methods.
5465         #  @param theShape Any shape.
5466         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5467         #                       returned, else all found sub-shapes and groups.
5468         #  @return List of existing sub-objects of \a theShape.
5469         #
5470         #  @ref swig_all_decompose "Example"
5471         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5472             """
5473             Get all sub-shapes and groups of theShape,
5474             that were created already by any other methods.
5475
5476             Parameters:
5477                 theShape Any shape.
5478                 theGroupsOnly If this parameter is TRUE, only groups will be
5479                                  returned, else all found sub-shapes and groups.
5480
5481             Returns:
5482                 List of existing sub-objects of theShape.
5483             """
5484             # Example: see GEOM_TestAll.py
5485             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5486             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5487             return ListObj
5488
5489         ## Get all groups of \a theShape,
5490         #  that were created already by any other methods.
5491         #  @param theShape Any shape.
5492         #  @return List of existing groups of \a theShape.
5493         #
5494         #  @ref swig_all_decompose "Example"
5495         def GetGroups(self, theShape):
5496             """
5497             Get all groups of theShape,
5498             that were created already by any other methods.
5499
5500             Parameters:
5501                 theShape Any shape.
5502
5503             Returns:
5504                 List of existing groups of theShape.
5505             """
5506             # Example: see GEOM_TestAll.py
5507             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5508             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5509             return ListObj
5510
5511         ## Explode a shape on sub-shapes of a given type.
5512         #  If the shape itself matches the type, it is also returned.
5513         #  @param aShape Shape to be exploded.
5514         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5515         #  @param theName Object name; when specified, this parameter is used
5516         #         for result publication in the study. Otherwise, if automatic
5517         #         publication is switched on, default value is used for result name.
5518         #
5519         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5520         #
5521         #  @ref swig_all_decompose "Example"
5522         def SubShapeAll(self, aShape, aType, theName=None):
5523             """
5524             Explode a shape on sub-shapes of a given type.
5525             If the shape itself matches the type, it is also returned.
5526
5527             Parameters:
5528                 aShape Shape to be exploded.
5529                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5530                 theName Object name; when specified, this parameter is used
5531                         for result publication in the study. Otherwise, if automatic
5532                         publication is switched on, default value is used for result name.
5533
5534             Returns:
5535                 List of sub-shapes of type theShapeType, contained in theShape.
5536             """
5537             # Example: see GEOM_TestAll.py
5538             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5539             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5540             self._autoPublish(ListObj, theName, "subshape")
5541             return ListObj
5542
5543         ## Explode a shape on sub-shapes of a given type.
5544         #  @param aShape Shape to be exploded.
5545         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5546         #  @return List of IDs of sub-shapes.
5547         #
5548         #  @ref swig_all_decompose "Example"
5549         def SubShapeAllIDs(self, aShape, aType):
5550             """
5551             Explode a shape on sub-shapes of a given type.
5552
5553             Parameters:
5554                 aShape Shape to be exploded (see geompy.ShapeType)
5555                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5556
5557             Returns:
5558                 List of IDs of sub-shapes.
5559             """
5560             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5561             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5562             return ListObj
5563
5564         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5565         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5566         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5567         #  @param aShape Shape to get sub-shape of.
5568         #  @param ListOfInd List of sub-shapes indices.
5569         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5570         #  @param theName Object name; when specified, this parameter is used
5571         #         for result publication in the study. Otherwise, if automatic
5572         #         publication is switched on, default value is used for result name.
5573         #
5574         #  @return A compound of sub-shapes of aShape.
5575         #
5576         #  @ref swig_all_decompose "Example"
5577         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5578             """
5579             Obtain a compound of sub-shapes of aShape,
5580             selected by their indices in list of all sub-shapes of type aType.
5581             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5582             
5583             Parameters:
5584                 aShape Shape to get sub-shape of.
5585                 ListOfID List of sub-shapes indices.
5586                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5587                 theName Object name; when specified, this parameter is used
5588                         for result publication in the study. Otherwise, if automatic
5589                         publication is switched on, default value is used for result name.
5590
5591             Returns:
5592                 A compound of sub-shapes of aShape.
5593             """
5594             # Example: see GEOM_TestAll.py
5595             ListOfIDs = []
5596             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5597             for ind in ListOfInd:
5598                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5599             # note: auto-publishing is done in self.GetSubShape()
5600             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5601             return anObj
5602
5603         ## Explode a shape on sub-shapes of a given type.
5604         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5605         #  If the shape itself matches the type, it is also returned.
5606         #  @param aShape Shape to be exploded.
5607         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5608         #  @param theName Object name; when specified, this parameter is used
5609         #         for result publication in the study. Otherwise, if automatic
5610         #         publication is switched on, default value is used for result name.
5611         #
5612         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5613         #
5614         #  @ref swig_SubShapeAllSorted "Example"
5615         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5616             """
5617             Explode a shape on sub-shapes of a given type.
5618             Sub-shapes will be sorted by coordinates of their gravity centers.
5619             If the shape itself matches the type, it is also returned.
5620
5621             Parameters: 
5622                 aShape Shape to be exploded.
5623                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5624                 theName Object name; when specified, this parameter is used
5625                         for result publication in the study. Otherwise, if automatic
5626                         publication is switched on, default value is used for result name.
5627
5628             Returns: 
5629                 List of sub-shapes of type theShapeType, contained in theShape.
5630             """
5631             # Example: see GEOM_TestAll.py
5632             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5633             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5634             self._autoPublish(ListObj, theName, "subshape")
5635             return ListObj
5636
5637         ## Explode a shape on sub-shapes of a given type.
5638         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5639         #  @param aShape Shape to be exploded.
5640         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5641         #  @return List of IDs of sub-shapes.
5642         #
5643         #  @ref swig_all_decompose "Example"
5644         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5645             """
5646             Explode a shape on sub-shapes of a given type.
5647             Sub-shapes will be sorted by coordinates of their gravity centers.
5648
5649             Parameters: 
5650                 aShape Shape to be exploded.
5651                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5652
5653             Returns: 
5654                 List of IDs of sub-shapes.
5655             """
5656             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5657             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5658             return ListIDs
5659
5660         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5661         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5662         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5663         #  @param aShape Shape to get sub-shape of.
5664         #  @param ListOfInd List of sub-shapes indices.
5665         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5666         #  @param theName Object name; when specified, this parameter is used
5667         #         for result publication in the study. Otherwise, if automatic
5668         #         publication is switched on, default value is used for result name.
5669         #
5670         #  @return A compound of sub-shapes of aShape.
5671         #
5672         #  @ref swig_all_decompose "Example"
5673         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5674             """
5675             Obtain a compound of sub-shapes of aShape,
5676             selected by they indices in sorted list of all sub-shapes of type aType.
5677             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5678
5679             Parameters:
5680                 aShape Shape to get sub-shape of.
5681                 ListOfID List of sub-shapes indices.
5682                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5683                 theName Object name; when specified, this parameter is used
5684                         for result publication in the study. Otherwise, if automatic
5685                         publication is switched on, default value is used for result name.
5686
5687             Returns:
5688                 A compound of sub-shapes of aShape.
5689             """
5690             # Example: see GEOM_TestAll.py
5691             ListOfIDs = []
5692             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5693             for ind in ListOfInd:
5694                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5695             # note: auto-publishing is done in self.GetSubShape()
5696             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5697             return anObj
5698
5699         ## Extract shapes (excluding the main shape) of given type.
5700         #  @param aShape The shape.
5701         #  @param aType  The shape type (see ShapeType())
5702         #  @param isSorted Boolean flag to switch sorting on/off.
5703         #  @param theName Object name; when specified, this parameter is used
5704         #         for result publication in the study. Otherwise, if automatic
5705         #         publication is switched on, default value is used for result name.
5706         #
5707         #  @return List of sub-shapes of type aType, contained in aShape.
5708         #
5709         #  @ref swig_FilletChamfer "Example"
5710         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5711             """
5712             Extract shapes (excluding the main shape) of given type.
5713
5714             Parameters:
5715                 aShape The shape.
5716                 aType  The shape type (see geompy.ShapeType)
5717                 isSorted Boolean flag to switch sorting on/off.
5718                 theName Object name; when specified, this parameter is used
5719                         for result publication in the study. Otherwise, if automatic
5720                         publication is switched on, default value is used for result name.
5721
5722             Returns:     
5723                 List of sub-shapes of type aType, contained in aShape.
5724             """
5725             # Example: see GEOM_TestAll.py
5726             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5727             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5728             self._autoPublish(ListObj, theName, "subshape")
5729             return ListObj
5730
5731         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5732         #  @param aShape Main shape.
5733         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5734         #  @param theName Object name; when specified, this parameter is used
5735         #         for result publication in the study. Otherwise, if automatic
5736         #         publication is switched on, default value is used for result name.
5737         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5738         #
5739         #  @ref swig_all_decompose "Example"
5740         def SubShapes(self, aShape, anIDs, theName=None):
5741             """
5742             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5743
5744             Parameters:
5745                 aShape Main shape.
5746                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5747                 theName Object name; when specified, this parameter is used
5748                         for result publication in the study. Otherwise, if automatic
5749                         publication is switched on, default value is used for result name.
5750
5751             Returns:      
5752                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5753             """
5754             # Example: see GEOM_TestAll.py
5755             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5756             RaiseIfFailed("SubShapes", self.ShapesOp)
5757             self._autoPublish(ListObj, theName, "subshape")
5758             return ListObj
5759
5760         # end of l4_decompose
5761         ## @}
5762
5763         ## @addtogroup l4_decompose_d
5764         ## @{
5765
5766         ## Deprecated method
5767         #  It works like SubShapeAllSortedCentres(), but wrongly
5768         #  defines centres of faces, shells and solids.
5769         def SubShapeAllSorted(self, aShape, aType, theName=None):
5770             """
5771             Deprecated method
5772             It works like geompy.SubShapeAllSortedCentres, but wrongly
5773             defines centres of faces, shells and solids.
5774             """
5775             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5776             RaiseIfFailed("MakeExplode", self.ShapesOp)
5777             self._autoPublish(ListObj, theName, "subshape")
5778             return ListObj
5779
5780         ## Deprecated method
5781         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5782         #  defines centres of faces, shells and solids.
5783         def SubShapeAllSortedIDs(self, aShape, aType):
5784             """
5785             Deprecated method
5786             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5787             defines centres of faces, shells and solids.
5788             """
5789             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5790             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5791             return ListIDs
5792
5793         ## Deprecated method
5794         #  It works like SubShapeSortedCentres(), but has a bug
5795         #  (wrongly defines centres of faces, shells and solids).
5796         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5797             """
5798             Deprecated method
5799             It works like geompy.SubShapeSortedCentres, but has a bug
5800             (wrongly defines centres of faces, shells and solids).
5801             """
5802             ListOfIDs = []
5803             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5804             for ind in ListOfInd:
5805                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5806             # note: auto-publishing is done in self.GetSubShape()
5807             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5808             return anObj
5809
5810         # end of l4_decompose_d
5811         ## @}
5812
5813         ## @addtogroup l3_healing
5814         ## @{
5815
5816         ## Apply a sequence of Shape Healing operators to the given object.
5817         #  @param theShape Shape to be processed.
5818         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5819         #  @param theParameters List of names of parameters
5820         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5821         #  @param theValues List of values of parameters, in the same order
5822         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5823         #  @param theName Object name; when specified, this parameter is used
5824         #         for result publication in the study. Otherwise, if automatic
5825         #         publication is switched on, default value is used for result name.
5826         #
5827         #  <b> Operators and Parameters: </b> \n
5828         #
5829         #  * \b FixShape - corrects invalid shapes. \n
5830         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5831         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5832         #
5833         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5834         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5835         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5836         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5837         #
5838         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5839         #    surfaces in segments using a certain angle. \n
5840         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5841         #    if Angle=180, four if Angle=90, etc). \n
5842         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5843         #
5844         #  * \b SplitClosedFaces - splits closed faces in segments.
5845         #    The number of segments depends on the number of splitting points.\n
5846         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5847         #
5848         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5849         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5850         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5851         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5852         #   This and the previous parameters can take the following values:\n
5853         #   \b Parametric \b Continuity \n
5854         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5855         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5856         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5857         #    ruling out sharp edges).\n
5858         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5859         #       are of the same magnitude).\n
5860         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5861         #    or surfaces (d/du C(u)) are the same at junction. \n
5862         #   \b Geometric \b Continuity \n
5863         #   \b G1: first derivatives are proportional at junction.\n
5864         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5865         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5866         #   \b G2: first and second derivatives are proportional at junction.
5867         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5868         #    continuity requires that the underlying parameterization was continuous as well.
5869         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5870         #
5871         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5872         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5873         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5874         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5875         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5876         #       with the specified parameters.\n
5877         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5878         #       with the specified parameters.\n
5879         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5880         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5881         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5882         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5883         #
5884         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5885         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5886         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5887         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5888         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5889         #
5890         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5891         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5892         #
5893         #
5894         #  @return New GEOM.GEOM_Object, containing processed shape.
5895         #
5896         #  \n @ref tui_shape_processing "Example"
5897         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5898             """
5899             Apply a sequence of Shape Healing operators to the given object.
5900
5901             Parameters:
5902                 theShape Shape to be processed.
5903                 theValues List of values of parameters, in the same order
5904                           as parameters are listed in theParameters list.
5905                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5906                 theParameters List of names of parameters
5907                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5908                 theName Object name; when specified, this parameter is used
5909                         for result publication in the study. Otherwise, if automatic
5910                         publication is switched on, default value is used for result name.
5911
5912                 Operators and Parameters:
5913
5914                  * FixShape - corrects invalid shapes.
5915                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5916                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5917                  * FixFaceSize - removes small faces, such as spots and strips.
5918                      * FixFaceSize.Tolerance - defines minimum possible face size.
5919                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5920                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5921                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5922                                 in segments using a certain angle.
5923                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5924                                           if Angle=180, four if Angle=90, etc).
5925                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5926                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5927                                       splitting points.
5928                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5929                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5930                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5931                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5932                      * SplitContinuity.CurveContinuity - required continuity for curves.
5933                        This and the previous parameters can take the following values:
5934                        
5935                        Parametric Continuity:
5936                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5937                                                    coincidental. The curves or surfaces may still meet at an angle,
5938                                                    giving rise to a sharp corner or edge).
5939                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5940                                                    are parallel, ruling out sharp edges).
5941                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5942                                                   or surfaces are of the same magnitude).
5943                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5944                           curves or surfaces (d/du C(u)) are the same at junction.
5945                           
5946                        Geometric Continuity:
5947                        G1: first derivatives are proportional at junction.
5948                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5949                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5950                        G2: first and second derivatives are proportional at junction. As the names imply,
5951                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5952                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5953                            geometric continuity of order n, but not vice-versa.
5954                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5955                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5956                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5957                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5958                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5959                                                         the specified parameters.
5960                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5961                                                         the specified parameters.
5962                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5963                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5964                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5965                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5966                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5967                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5968                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5969                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5970                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5971                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5972                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5973
5974             Returns:
5975                 New GEOM.GEOM_Object, containing processed shape.
5976
5977             Note: For more information look through SALOME Geometry User's Guide->
5978                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5979             """
5980             # Example: see GEOM_TestHealing.py
5981             theValues,Parameters = ParseList(theValues)
5982             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5983             # To avoid script failure in case of good argument shape
5984             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5985                 return theShape
5986             RaiseIfFailed("ProcessShape", self.HealOp)
5987             for string in (theOperators + theParameters):
5988                 Parameters = ":" + Parameters
5989                 pass
5990             anObj.SetParameters(Parameters)
5991             self._autoPublish(anObj, theName, "healed")
5992             return anObj
5993
5994         ## Remove faces from the given object (shape).
5995         #  @param theObject Shape to be processed.
5996         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5997         #                  removes ALL faces of the given object.
5998         #  @param theName Object name; when specified, this parameter is used
5999         #         for result publication in the study. Otherwise, if automatic
6000         #         publication is switched on, default value is used for result name.
6001         #
6002         #  @return New GEOM.GEOM_Object, containing processed shape.
6003         #
6004         #  @ref tui_suppress_faces "Example"
6005         def SuppressFaces(self, theObject, theFaces, theName=None):
6006             """
6007             Remove faces from the given object (shape).
6008
6009             Parameters:
6010                 theObject Shape to be processed.
6011                 theFaces Indices of faces to be removed, if EMPTY then the method
6012                          removes ALL faces of the given object.
6013                 theName Object name; when specified, this parameter is used
6014                         for result publication in the study. Otherwise, if automatic
6015                         publication is switched on, default value is used for result name.
6016
6017             Returns:
6018                 New GEOM.GEOM_Object, containing processed shape.
6019             """
6020             # Example: see GEOM_TestHealing.py
6021             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6022             RaiseIfFailed("SuppressFaces", self.HealOp)
6023             self._autoPublish(anObj, theName, "suppressFaces")
6024             return anObj
6025
6026         ## Sewing of some shapes into single shape.
6027         #  @param ListShape Shapes to be processed.
6028         #  @param theTolerance Required tolerance value.
6029         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6030         #  @param theName Object name; when specified, this parameter is used
6031         #         for result publication in the study. Otherwise, if automatic
6032         #         publication is switched on, default value is used for result name.
6033         #
6034         #  @return New GEOM.GEOM_Object, containing processed shape.
6035         #
6036         #  @ref tui_sewing "Example"
6037         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6038             """
6039             Sewing of some shapes into single shape.
6040
6041             Parameters:
6042                 ListShape Shapes to be processed.
6043                 theTolerance Required tolerance value.
6044                 AllowNonManifold Flag that allows non-manifold sewing.
6045                 theName Object name; when specified, this parameter is used
6046                         for result publication in the study. Otherwise, if automatic
6047                         publication is switched on, default value is used for result name.
6048
6049             Returns:
6050                 New GEOM.GEOM_Object, containing processed shape.
6051             """
6052             # Example: see GEOM_TestHealing.py
6053             comp = self.MakeCompound(ListShape)
6054             # note: auto-publishing is done in self.Sew()
6055             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6056             return anObj
6057
6058         ## Sewing of the given object.
6059         #  @param theObject Shape to be processed.
6060         #  @param theTolerance Required tolerance value.
6061         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6062         #  @param theName Object name; when specified, this parameter is used
6063         #         for result publication in the study. Otherwise, if automatic
6064         #         publication is switched on, default value is used for result name.
6065         #
6066         #  @return New GEOM.GEOM_Object, containing processed shape.
6067         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6068             """
6069             Sewing of the given object.
6070
6071             Parameters:
6072                 theObject Shape to be processed.
6073                 theTolerance Required tolerance value.
6074                 AllowNonManifold Flag that allows non-manifold sewing.
6075                 theName Object name; when specified, this parameter is used
6076                         for result publication in the study. Otherwise, if automatic
6077                         publication is switched on, default value is used for result name.
6078
6079             Returns:
6080                 New GEOM.GEOM_Object, containing processed shape.
6081             """
6082             # Example: see MakeSewing() above
6083             theTolerance,Parameters = ParseParameters(theTolerance)
6084             if AllowNonManifold:
6085                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6086             else:
6087                 anObj = self.HealOp.Sew(theObject, theTolerance)
6088             # To avoid script failure in case of good argument shape
6089             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6090                 return theObject
6091             RaiseIfFailed("Sew", self.HealOp)
6092             anObj.SetParameters(Parameters)
6093             self._autoPublish(anObj, theName, "sewed")
6094             return anObj
6095
6096         ## Rebuild the topology of theCompound of solids by removing
6097         #  of the faces that are shared by several solids.
6098         #  @param theCompound Shape to be processed.
6099         #  @param theName Object name; when specified, this parameter is used
6100         #         for result publication in the study. Otherwise, if automatic
6101         #         publication is switched on, default value is used for result name.
6102         #
6103         #  @return New GEOM.GEOM_Object, containing processed shape.
6104         #
6105         #  @ref tui_remove_webs "Example"
6106         def RemoveInternalFaces (self, theCompound, theName=None):
6107             """
6108             Rebuild the topology of theCompound of solids by removing
6109             of the faces that are shared by several solids.
6110
6111             Parameters:
6112                 theCompound Shape to be processed.
6113                 theName Object name; when specified, this parameter is used
6114                         for result publication in the study. Otherwise, if automatic
6115                         publication is switched on, default value is used for result name.
6116
6117             Returns:
6118                 New GEOM.GEOM_Object, containing processed shape.
6119             """
6120             # Example: see GEOM_TestHealing.py
6121             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6122             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6123             self._autoPublish(anObj, theName, "removeWebs")
6124             return anObj
6125
6126         ## Remove internal wires and edges from the given object (face).
6127         #  @param theObject Shape to be processed.
6128         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6129         #                  removes ALL internal wires of the given object.
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_suppress_internal_wires "Example"
6137         def SuppressInternalWires(self, theObject, theWires, theName=None):
6138             """
6139             Remove internal wires and edges from the given object (face).
6140
6141             Parameters:
6142                 theObject Shape to be processed.
6143                 theWires Indices of wires to be removed, if EMPTY then the method
6144                          removes ALL internal wires of the given object.
6145                 theName Object name; when specified, this parameter is used
6146                         for result publication in the study. Otherwise, if automatic
6147                         publication is switched on, default value is used for result name.
6148
6149             Returns:                
6150                 New GEOM.GEOM_Object, containing processed shape.
6151             """
6152             # Example: see GEOM_TestHealing.py
6153             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6154             RaiseIfFailed("RemoveIntWires", self.HealOp)
6155             self._autoPublish(anObj, theName, "suppressWires")
6156             return anObj
6157
6158         ## Remove internal closed contours (holes) from the given object.
6159         #  @param theObject Shape to be processed.
6160         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6161         #                  removes ALL internal holes of the given object
6162         #  @param theName Object name; when specified, this parameter is used
6163         #         for result publication in the study. Otherwise, if automatic
6164         #         publication is switched on, default value is used for result name.
6165         #
6166         #  @return New GEOM.GEOM_Object, containing processed shape.
6167         #
6168         #  @ref tui_suppress_holes "Example"
6169         def SuppressHoles(self, theObject, theWires, theName=None):
6170             """
6171             Remove internal closed contours (holes) from the given object.
6172
6173             Parameters:
6174                 theObject Shape to be processed.
6175                 theWires Indices of wires to be removed, if EMPTY then the method
6176                          removes ALL internal holes of the given object
6177                 theName Object name; when specified, this parameter is used
6178                         for result publication in the study. Otherwise, if automatic
6179                         publication is switched on, default value is used for result name.
6180
6181             Returns:    
6182                 New GEOM.GEOM_Object, containing processed shape.
6183             """
6184             # Example: see GEOM_TestHealing.py
6185             anObj = self.HealOp.FillHoles(theObject, theWires)
6186             RaiseIfFailed("FillHoles", self.HealOp)
6187             self._autoPublish(anObj, theName, "suppressHoles")
6188             return anObj
6189
6190         ## Close an open wire.
6191         #  @param theObject Shape to be processed.
6192         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6193         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6194         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6195         #                        If False : closure by creation of an edge between ends.
6196         #  @param theName Object name; when specified, this parameter is used
6197         #         for result publication in the study. Otherwise, if automatic
6198         #         publication is switched on, default value is used for result name.
6199         #
6200         #  @return New GEOM.GEOM_Object, containing processed shape.
6201         #
6202         #  @ref tui_close_contour "Example"
6203         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6204             """
6205             Close an open wire.
6206
6207             Parameters: 
6208                 theObject Shape to be processed.
6209                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6210                          if [ ], then theObject itself is a wire.
6211                 isCommonVertex If True  : closure by creation of a common vertex,
6212                                If False : closure by creation of an edge between ends.
6213                 theName Object name; when specified, this parameter is used
6214                         for result publication in the study. Otherwise, if automatic
6215                         publication is switched on, default value is used for result name.
6216
6217             Returns:                      
6218                 New GEOM.GEOM_Object, containing processed shape. 
6219             """
6220             # Example: see GEOM_TestHealing.py
6221             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6222             RaiseIfFailed("CloseContour", self.HealOp)
6223             self._autoPublish(anObj, theName, "closeContour")
6224             return anObj
6225
6226         ## Addition of a point to a given edge object.
6227         #  @param theObject Shape to be processed.
6228         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6229         #                      if -1, then theObject itself is the edge.
6230         #  @param theValue Value of parameter on edge or length parameter,
6231         #                  depending on \a isByParameter.
6232         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6233         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6234         #  @param theName Object name; when specified, this parameter is used
6235         #         for result publication in the study. Otherwise, if automatic
6236         #         publication is switched on, default value is used for result name.
6237         #
6238         #  @return New GEOM.GEOM_Object, containing processed shape.
6239         #
6240         #  @ref tui_add_point_on_edge "Example"
6241         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6242             """
6243             Addition of a point to a given edge object.
6244
6245             Parameters: 
6246                 theObject Shape to be processed.
6247                 theEdgeIndex Index of edge to be divided within theObject's shape,
6248                              if -1, then theObject itself is the edge.
6249                 theValue Value of parameter on edge or length parameter,
6250                          depending on isByParameter.
6251                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6252                               if FALSE : theValue is treated as a length parameter [0..1]
6253                 theName Object name; when specified, this parameter is used
6254                         for result publication in the study. Otherwise, if automatic
6255                         publication is switched on, default value is used for result name.
6256
6257             Returns:  
6258                 New GEOM.GEOM_Object, containing processed shape.
6259             """
6260             # Example: see GEOM_TestHealing.py
6261             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6262             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6263             RaiseIfFailed("DivideEdge", self.HealOp)
6264             anObj.SetParameters(Parameters)
6265             self._autoPublish(anObj, theName, "divideEdge")
6266             return anObj
6267
6268         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6269         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6270         #  @param theVertices A list of vertices to suppress. If the list
6271         #                     is empty, all vertices in a wire will be assumed.
6272         #  @param theName Object name; when specified, this parameter is used
6273         #         for result publication in the study. Otherwise, if automatic
6274         #         publication is switched on, default value is used for result name.
6275         #
6276         #  @return New GEOM.GEOM_Object with modified wire.
6277         #
6278         #  @ref tui_fuse_collinear_edges "Example"
6279         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6280             """
6281             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6282
6283             Parameters: 
6284                 theWire Wire to minimize the number of C1 continuous edges in.
6285                 theVertices A list of vertices to suppress. If the list
6286                             is empty, all vertices in a wire will be assumed.
6287                 theName Object name; when specified, this parameter is used
6288                         for result publication in the study. Otherwise, if automatic
6289                         publication is switched on, default value is used for result name.
6290
6291             Returns:  
6292                 New GEOM.GEOM_Object with modified wire.
6293             """
6294             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6295             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6296             self._autoPublish(anObj, theName, "fuseEdges")
6297             return anObj
6298
6299         ## Change orientation of the given object. Updates given shape.
6300         #  @param theObject Shape to be processed.
6301         #  @return Updated <var>theObject</var>
6302         #
6303         #  @ref swig_todo "Example"
6304         def ChangeOrientationShell(self,theObject):
6305             """
6306             Change orientation of the given object. Updates given shape.
6307
6308             Parameters: 
6309                 theObject Shape to be processed.
6310
6311             Returns:  
6312                 Updated theObject
6313             """
6314             theObject = self.HealOp.ChangeOrientation(theObject)
6315             RaiseIfFailed("ChangeOrientation", self.HealOp)
6316             pass
6317
6318         ## Change orientation of the given object.
6319         #  @param theObject Shape to be processed.
6320         #  @param theName Object name; when specified, this parameter is used
6321         #         for result publication in the study. Otherwise, if automatic
6322         #         publication is switched on, default value is used for result name.
6323         #
6324         #  @return New GEOM.GEOM_Object, containing processed shape.
6325         #
6326         #  @ref swig_todo "Example"
6327         def ChangeOrientationShellCopy(self, theObject, theName=None):
6328             """
6329             Change orientation of the given object.
6330
6331             Parameters:
6332                 theObject Shape to be processed.
6333                 theName Object name; when specified, this parameter is used
6334                         for result publication in the study. Otherwise, if automatic
6335                         publication is switched on, default value is used for result name.
6336
6337             Returns:   
6338                 New GEOM.GEOM_Object, containing processed shape.
6339             """
6340             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6341             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6342             self._autoPublish(anObj, theName, "reversed")
6343             return anObj
6344
6345         ## Try to limit tolerance of the given object by value \a theTolerance.
6346         #  @param theObject Shape to be processed.
6347         #  @param theTolerance Required tolerance value.
6348         #  @param theName Object name; when specified, this parameter is used
6349         #         for result publication in the study. Otherwise, if automatic
6350         #         publication is switched on, default value is used for result name.
6351         #
6352         #  @return New GEOM.GEOM_Object, containing processed shape.
6353         #
6354         #  @ref tui_limit_tolerance "Example"
6355         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6356             """
6357             Try to limit tolerance of the given object by value theTolerance.
6358
6359             Parameters:
6360                 theObject Shape to be processed.
6361                 theTolerance Required tolerance value.
6362                 theName Object name; when specified, this parameter is used
6363                         for result publication in the study. Otherwise, if automatic
6364                         publication is switched on, default value is used for result name.
6365
6366             Returns:   
6367                 New GEOM.GEOM_Object, containing processed shape.
6368             """
6369             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6370             RaiseIfFailed("LimitTolerance", self.HealOp)
6371             self._autoPublish(anObj, theName, "limitTolerance")
6372             return anObj
6373
6374         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6375         #  that constitute a free boundary of the given shape.
6376         #  @param theObject Shape to get free boundary of.
6377         #  @param theName Object name; when specified, this parameter is used
6378         #         for result publication in the study. Otherwise, if automatic
6379         #         publication is switched on, default value is used for result name.
6380         #
6381         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6382         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6383         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6384         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6385         #
6386         #  @ref tui_measurement_tools_page "Example"
6387         def GetFreeBoundary(self, theObject, theName=None):
6388             """
6389             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6390             that constitute a free boundary of the given shape.
6391
6392             Parameters:
6393                 theObject Shape to get free boundary of.
6394                 theName Object name; when specified, this parameter is used
6395                         for result publication in the study. Otherwise, if automatic
6396                         publication is switched on, default value is used for result name.
6397
6398             Returns: 
6399                 [status, theClosedWires, theOpenWires]
6400                  status: FALSE, if an error(s) occured during the method execution.
6401                  theClosedWires: Closed wires on the free boundary of the given shape.
6402                  theOpenWires: Open wires on the free boundary of the given shape.
6403             """
6404             # Example: see GEOM_TestHealing.py
6405             anObj = self.HealOp.GetFreeBoundary(theObject)
6406             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6407             self._autoPublish(anObj[1], theName, "closedWire")
6408             self._autoPublish(anObj[2], theName, "openWire")
6409             return anObj
6410
6411         ## Replace coincident faces in theShape by one face.
6412         #  @param theShape Initial shape.
6413         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6414         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6415         #                         otherwise all initial shapes.
6416         #  @param theName Object name; when specified, this parameter is used
6417         #         for result publication in the study. Otherwise, if automatic
6418         #         publication is switched on, default value is used for result name.
6419         #
6420         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6421         #
6422         #  @ref tui_glue_faces "Example"
6423         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6424             """
6425             Replace coincident faces in theShape by one face.
6426
6427             Parameters:
6428                 theShape Initial shape.
6429                 theTolerance Maximum distance between faces, which can be considered as coincident.
6430                 doKeepNonSolids If FALSE, only solids will present in the result,
6431                                 otherwise all initial shapes.
6432                 theName Object name; when specified, this parameter is used
6433                         for result publication in the study. Otherwise, if automatic
6434                         publication is switched on, default value is used for result name.
6435
6436             Returns:
6437                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6438             """
6439             # Example: see GEOM_Spanner.py
6440             theTolerance,Parameters = ParseParameters(theTolerance)
6441             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6442             if anObj is None:
6443                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6444             anObj.SetParameters(Parameters)
6445             self._autoPublish(anObj, theName, "glueFaces")
6446             return anObj
6447
6448         ## Find coincident faces in theShape for possible gluing.
6449         #  @param theShape Initial shape.
6450         #  @param theTolerance Maximum distance between faces,
6451         #                      which can be considered as coincident.
6452         #  @param theName Object name; when specified, this parameter is used
6453         #         for result publication in the study. Otherwise, if automatic
6454         #         publication is switched on, default value is used for result name.
6455         #
6456         #  @return GEOM.ListOfGO
6457         #
6458         #  @ref tui_glue_faces "Example"
6459         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6460             """
6461             Find coincident faces in theShape for possible gluing.
6462
6463             Parameters:
6464                 theShape Initial shape.
6465                 theTolerance Maximum distance between faces,
6466                              which can be considered as coincident.
6467                 theName Object name; when specified, this parameter is used
6468                         for result publication in the study. Otherwise, if automatic
6469                         publication is switched on, default value is used for result name.
6470
6471             Returns:                    
6472                 GEOM.ListOfGO
6473             """
6474             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6475             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6476             self._autoPublish(anObj, theName, "facesToGlue")
6477             return anObj
6478
6479         ## Replace coincident faces in theShape by one face
6480         #  in compliance with given list of faces
6481         #  @param theShape Initial shape.
6482         #  @param theTolerance Maximum distance between faces,
6483         #                      which can be considered as coincident.
6484         #  @param theFaces List of faces for gluing.
6485         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6486         #                         otherwise all initial shapes.
6487         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6488         #                        will be glued, otherwise only the edges,
6489         #                        belonging to <VAR>theFaces</VAR>.
6490         #  @param theName Object name; when specified, this parameter is used
6491         #         for result publication in the study. Otherwise, if automatic
6492         #         publication is switched on, default value is used for result name.
6493         #
6494         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6495         #          without some faces.
6496         #
6497         #  @ref tui_glue_faces "Example"
6498         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6499                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6500             """
6501             Replace coincident faces in theShape by one face
6502             in compliance with given list of faces
6503
6504             Parameters:
6505                 theShape Initial shape.
6506                 theTolerance Maximum distance between faces,
6507                              which can be considered as coincident.
6508                 theFaces List of faces for gluing.
6509                 doKeepNonSolids If FALSE, only solids will present in the result,
6510                                 otherwise all initial shapes.
6511                 doGlueAllEdges If TRUE, all coincident edges of theShape
6512                                will be glued, otherwise only the edges,
6513                                belonging to theFaces.
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                 New GEOM.GEOM_Object, containing a copy of theShape
6520                     without some faces.
6521             """
6522             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6523                                                       doKeepNonSolids, doGlueAllEdges)
6524             if anObj is None:
6525                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6526             self._autoPublish(anObj, theName, "glueFaces")
6527             return anObj
6528
6529         ## Replace coincident edges in theShape by one edge.
6530         #  @param theShape Initial shape.
6531         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
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 without coincident edges.
6537         #
6538         #  @ref tui_glue_edges "Example"
6539         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6540             """
6541             Replace coincident edges in theShape by one edge.
6542
6543             Parameters:
6544                 theShape Initial shape.
6545                 theTolerance Maximum distance between edges, which can be considered as coincident.
6546                 theName Object name; when specified, this parameter is used
6547                         for result publication in the study. Otherwise, if automatic
6548                         publication is switched on, default value is used for result name.
6549
6550             Returns:    
6551                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6552             """
6553             theTolerance,Parameters = ParseParameters(theTolerance)
6554             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6555             if anObj is None:
6556                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6557             anObj.SetParameters(Parameters)
6558             self._autoPublish(anObj, theName, "glueEdges")
6559             return anObj
6560
6561         ## Find coincident edges in theShape for possible gluing.
6562         #  @param theShape Initial shape.
6563         #  @param theTolerance Maximum distance between edges,
6564         #                      which can be considered as coincident.
6565         #  @param theName Object name; when specified, this parameter is used
6566         #         for result publication in the study. Otherwise, if automatic
6567         #         publication is switched on, default value is used for result name.
6568         #
6569         #  @return GEOM.ListOfGO
6570         #
6571         #  @ref tui_glue_edges "Example"
6572         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6573             """
6574             Find coincident edges in theShape for possible gluing.
6575
6576             Parameters:
6577                 theShape Initial shape.
6578                 theTolerance Maximum distance between edges,
6579                              which can be considered as coincident.
6580                 theName Object name; when specified, this parameter is used
6581                         for result publication in the study. Otherwise, if automatic
6582                         publication is switched on, default value is used for result name.
6583
6584             Returns:                         
6585                 GEOM.ListOfGO
6586             """
6587             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6588             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6589             self._autoPublish(anObj, theName, "edgesToGlue")
6590             return anObj
6591
6592         ## Replace coincident edges in theShape by one edge
6593         #  in compliance with given list of edges.
6594         #  @param theShape Initial shape.
6595         #  @param theTolerance Maximum distance between edges,
6596         #                      which can be considered as coincident.
6597         #  @param theEdges List of edges for gluing.
6598         #  @param theName Object name; when specified, this parameter is used
6599         #         for result publication in the study. Otherwise, if automatic
6600         #         publication is switched on, default value is used for result name.
6601         #
6602         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6603         #          without some edges.
6604         #
6605         #  @ref tui_glue_edges "Example"
6606         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6607             """
6608             Replace coincident edges in theShape by one edge
6609             in compliance with given list of edges.
6610
6611             Parameters:
6612                 theShape Initial shape.
6613                 theTolerance Maximum distance between edges,
6614                              which can be considered as coincident.
6615                 theEdges List of edges for gluing.
6616                 theName Object name; when specified, this parameter is used
6617                         for result publication in the study. Otherwise, if automatic
6618                         publication is switched on, default value is used for result name.
6619
6620             Returns:  
6621                 New GEOM.GEOM_Object, containing a copy of theShape
6622                 without some edges.
6623             """
6624             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6625             if anObj is None:
6626                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6627             self._autoPublish(anObj, theName, "glueEdges")
6628             return anObj
6629
6630         # end of l3_healing
6631         ## @}
6632
6633         ## @addtogroup l3_boolean Boolean Operations
6634         ## @{
6635
6636         # -----------------------------------------------------------------------------
6637         # Boolean (Common, Cut, Fuse, Section)
6638         # -----------------------------------------------------------------------------
6639
6640         ## Perform one of boolean operations on two given shapes.
6641         #  @param theShape1 First argument for boolean operation.
6642         #  @param theShape2 Second argument for boolean operation.
6643         #  @param theOperation Indicates the operation to be done:\n
6644         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6645         #  @param checkSelfInte The flag that tells if the arguments should
6646         #         be checked for self-intersection prior to the operation.
6647         #  @param theName Object name; when specified, this parameter is used
6648         #         for result publication in the study. Otherwise, if automatic
6649         #         publication is switched on, default value is used for result name.
6650         #
6651         #  @return New GEOM.GEOM_Object, containing the result shape.
6652         #
6653         #  @ref tui_fuse "Example"
6654         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6655             """
6656             Perform one of boolean operations on two given shapes.
6657
6658             Parameters: 
6659                 theShape1 First argument for boolean operation.
6660                 theShape2 Second argument for boolean operation.
6661                 theOperation Indicates the operation to be done:
6662                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6663                 checkSelfInte The flag that tells if the arguments should
6664                               be checked for self-intersection prior to
6665                               the operation.
6666                 theName Object name; when specified, this parameter is used
6667                         for result publication in the study. Otherwise, if automatic
6668                         publication is switched on, default value is used for result name.
6669
6670             Returns:   
6671                 New GEOM.GEOM_Object, containing the result shape.
6672             """
6673             # Example: see GEOM_TestAll.py
6674             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
6675             RaiseIfFailed("MakeBoolean", self.BoolOp)
6676             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6677             self._autoPublish(anObj, theName, def_names[theOperation])
6678             return anObj
6679
6680         ## Perform Common boolean operation on two given shapes.
6681         #  @param theShape1 First argument for boolean operation.
6682         #  @param theShape2 Second argument for boolean operation.
6683         #  @param checkSelfInte The flag that tells if the arguments should
6684         #         be checked for self-intersection prior to the operation.
6685         #  @param theName Object name; when specified, this parameter is used
6686         #         for result publication in the study. Otherwise, if automatic
6687         #         publication is switched on, default value is used for result name.
6688         #
6689         #  @return New GEOM.GEOM_Object, containing the result shape.
6690         #
6691         #  @ref tui_common "Example 1"
6692         #  \n @ref swig_MakeCommon "Example 2"
6693         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6694             """
6695             Perform Common boolean operation on two given shapes.
6696
6697             Parameters: 
6698                 theShape1 First argument for boolean operation.
6699                 theShape2 Second argument for boolean operation.
6700                 checkSelfInte The flag that tells if the arguments should
6701                               be checked for self-intersection prior to
6702                               the operation.
6703                 theName Object name; when specified, this parameter is used
6704                         for result publication in the study. Otherwise, if automatic
6705                         publication is switched on, default value is used for result name.
6706
6707             Returns:   
6708                 New GEOM.GEOM_Object, containing the result shape.
6709             """
6710             # Example: see GEOM_TestOthers.py
6711             # note: auto-publishing is done in self.MakeBoolean()
6712             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
6713
6714         ## Perform Cut boolean operation on two given shapes.
6715         #  @param theShape1 First argument for boolean operation.
6716         #  @param theShape2 Second argument for boolean operation.
6717         #  @param checkSelfInte The flag that tells if the arguments should
6718         #         be checked for self-intersection prior to the operation.
6719         #  @param theName Object name; when specified, this parameter is used
6720         #         for result publication in the study. Otherwise, if automatic
6721         #         publication is switched on, default value is used for result name.
6722         #
6723         #  @return New GEOM.GEOM_Object, containing the result shape.
6724         #
6725         #  @ref tui_cut "Example 1"
6726         #  \n @ref swig_MakeCommon "Example 2"
6727         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6728             """
6729             Perform Cut boolean operation on two given shapes.
6730
6731             Parameters: 
6732                 theShape1 First argument for boolean operation.
6733                 theShape2 Second argument for boolean operation.
6734                 checkSelfInte The flag that tells if the arguments should
6735                               be checked for self-intersection prior to
6736                               the operation.
6737                 theName Object name; when specified, this parameter is used
6738                         for result publication in the study. Otherwise, if automatic
6739                         publication is switched on, default value is used for result name.
6740
6741             Returns:   
6742                 New GEOM.GEOM_Object, containing the result shape.
6743             
6744             """
6745             # Example: see GEOM_TestOthers.py
6746             # note: auto-publishing is done in self.MakeBoolean()
6747             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
6748
6749         ## Perform Fuse boolean operation on two given shapes.
6750         #  @param theShape1 First argument for boolean operation.
6751         #  @param theShape2 Second argument for boolean operation.
6752         #  @param checkSelfInte The flag that tells if the arguments should
6753         #         be checked for self-intersection prior to the operation.
6754         #  @param theName Object name; when specified, this parameter is used
6755         #         for result publication in the study. Otherwise, if automatic
6756         #         publication is switched on, default value is used for result name.
6757         #
6758         #  @return New GEOM.GEOM_Object, containing the result shape.
6759         #
6760         #  @ref tui_fuse "Example 1"
6761         #  \n @ref swig_MakeCommon "Example 2"
6762         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6763             """
6764             Perform Fuse boolean operation on two given shapes.
6765
6766             Parameters: 
6767                 theShape1 First argument for boolean operation.
6768                 theShape2 Second argument for boolean operation.
6769                 checkSelfInte The flag that tells if the arguments should
6770                               be checked for self-intersection prior to
6771                               the operation.
6772                 theName Object name; when specified, this parameter is used
6773                         for result publication in the study. Otherwise, if automatic
6774                         publication is switched on, default value is used for result name.
6775
6776             Returns:   
6777                 New GEOM.GEOM_Object, containing the result shape.
6778             
6779             """
6780             # Example: see GEOM_TestOthers.py
6781             # note: auto-publishing is done in self.MakeBoolean()
6782             return self.MakeBoolean(theShape1, theShape2, 3, checkSelfInte, theName)
6783
6784         ## Perform Section boolean operation on two given shapes.
6785         #  @param theShape1 First argument for boolean operation.
6786         #  @param theShape2 Second argument for boolean operation.
6787         #  @param checkSelfInte The flag that tells if the arguments should
6788         #         be checked for self-intersection prior to the operation.
6789         #  @param theName Object name; when specified, this parameter is used
6790         #         for result publication in the study. Otherwise, if automatic
6791         #         publication is switched on, default value is used for result name.
6792         #
6793         #  @return New GEOM.GEOM_Object, containing the result shape.
6794         #
6795         #  @ref tui_section "Example 1"
6796         #  \n @ref swig_MakeCommon "Example 2"
6797         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6798             """
6799             Perform Section boolean operation on two given shapes.
6800
6801             Parameters: 
6802                 theShape1 First argument for boolean operation.
6803                 theShape2 Second argument for boolean operation.
6804                 checkSelfInte The flag that tells if the arguments should
6805                               be checked for self-intersection prior to
6806                               the operation.
6807                 theName Object name; when specified, this parameter is used
6808                         for result publication in the study. Otherwise, if automatic
6809                         publication is switched on, default value is used for result name.
6810
6811             Returns:   
6812                 New GEOM.GEOM_Object, containing the result shape.
6813             
6814             """
6815             # Example: see GEOM_TestOthers.py
6816             # note: auto-publishing is done in self.MakeBoolean()
6817             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
6818
6819         ## Perform Fuse boolean operation on the list of shapes.
6820         #  @param theShapesList Shapes to be fused.
6821         #  @param checkSelfInte The flag that tells if the arguments should
6822         #         be checked for self-intersection prior to the operation.
6823         #  @param theName Object name; when specified, this parameter is used
6824         #         for result publication in the study. Otherwise, if automatic
6825         #         publication is switched on, default value is used for result name.
6826         #
6827         #  @return New GEOM.GEOM_Object, containing the result shape.
6828         #
6829         #  @ref tui_fuse "Example 1"
6830         #  \n @ref swig_MakeCommon "Example 2"
6831         def MakeFuseList(self, theShapesList, checkSelfInte=False, theName=None):
6832             """
6833             Perform Fuse boolean operation on the list of shapes.
6834
6835             Parameters: 
6836                 theShapesList Shapes to be fused.
6837                 checkSelfInte The flag that tells if the arguments should
6838                               be checked for self-intersection prior to
6839                               the operation.
6840                 theName Object name; when specified, this parameter is used
6841                         for result publication in the study. Otherwise, if automatic
6842                         publication is switched on, default value is used for result name.
6843
6844             Returns:   
6845                 New GEOM.GEOM_Object, containing the result shape.
6846             
6847             """
6848             # Example: see GEOM_TestOthers.py
6849             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte)
6850             RaiseIfFailed("MakeFuseList", self.BoolOp)
6851             self._autoPublish(anObj, theName, "fuse")
6852             return anObj
6853
6854         ## Perform Common boolean operation on the list of shapes.
6855         #  @param theShapesList Shapes for Common operation.
6856         #  @param checkSelfInte The flag that tells if the arguments should
6857         #         be checked for self-intersection prior to the operation.
6858         #  @param theName Object name; when specified, this parameter is used
6859         #         for result publication in the study. Otherwise, if automatic
6860         #         publication is switched on, default value is used for result name.
6861         #
6862         #  @return New GEOM.GEOM_Object, containing the result shape.
6863         #
6864         #  @ref tui_common "Example 1"
6865         #  \n @ref swig_MakeCommon "Example 2"
6866         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
6867             """
6868             Perform Common boolean operation on the list of shapes.
6869
6870             Parameters: 
6871                 theShapesList Shapes for Common operation.
6872                 checkSelfInte The flag that tells if the arguments should
6873                               be checked for self-intersection prior to
6874                               the operation.
6875                 theName Object name; when specified, this parameter is used
6876                         for result publication in the study. Otherwise, if automatic
6877                         publication is switched on, default value is used for result name.
6878
6879             Returns:   
6880                 New GEOM.GEOM_Object, containing the result shape.
6881             
6882             """
6883             # Example: see GEOM_TestOthers.py
6884             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
6885             RaiseIfFailed("MakeCommonList", self.BoolOp)
6886             self._autoPublish(anObj, theName, "common")
6887             return anObj
6888
6889         ## Perform Cut boolean operation on one object and the list of tools.
6890         #  @param theMainShape The object of the operation.
6891         #  @param theShapesList The list of tools of the operation.
6892         #  @param checkSelfInte The flag that tells if the arguments should
6893         #         be checked for self-intersection prior to the operation.
6894         #  @param theName Object name; when specified, this parameter is used
6895         #         for result publication in the study. Otherwise, if automatic
6896         #         publication is switched on, default value is used for result name.
6897         #
6898         #  @return New GEOM.GEOM_Object, containing the result shape.
6899         #
6900         #  @ref tui_cut "Example 1"
6901         #  \n @ref swig_MakeCommon "Example 2"
6902         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
6903             """
6904             Perform Cut boolean operation on one object and the list of tools.
6905
6906             Parameters: 
6907                 theMainShape The object of the operation.
6908                 theShapesList The list of tools of the operation.
6909                 checkSelfInte The flag that tells if the arguments should
6910                               be checked for self-intersection prior to
6911                               the operation.
6912                 theName Object name; when specified, this parameter is used
6913                         for result publication in the study. Otherwise, if automatic
6914                         publication is switched on, default value is used for result name.
6915
6916             Returns:   
6917                 New GEOM.GEOM_Object, containing the result shape.
6918             
6919             """
6920             # Example: see GEOM_TestOthers.py
6921             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
6922             RaiseIfFailed("MakeCutList", self.BoolOp)
6923             self._autoPublish(anObj, theName, "cut")
6924             return anObj
6925
6926         # end of l3_boolean
6927         ## @}
6928
6929         ## @addtogroup l3_basic_op
6930         ## @{
6931
6932         ## Perform partition operation.
6933         #  @param ListShapes Shapes to be intersected.
6934         #  @param ListTools Shapes to intersect theShapes.
6935         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6936         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6937         #         type will be detected automatically.
6938         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6939         #                             target type (equal to Limit) are kept in the result,
6940         #                             else standalone shapes of lower dimension
6941         #                             are kept also (if they exist).
6942         #  @param theName Object name; when specified, this parameter is used
6943         #         for result publication in the study. Otherwise, if automatic
6944         #         publication is switched on, default value is used for result name.
6945         #
6946         #  @note Each compound from ListShapes and ListTools will be exploded
6947         #        in order to avoid possible intersection between shapes from this compound.
6948         #
6949         #  After implementation new version of PartitionAlgo (October 2006)
6950         #  other parameters are ignored by current functionality. They are kept
6951         #  in this function only for support old versions.
6952         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6953         #         Each shape from theKeepInside must belong to theShapes also.
6954         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6955         #         Each shape from theRemoveInside must belong to theShapes also.
6956         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6957         #      @param ListMaterials Material indices for each shape. Make sence,
6958         #         only if theRemoveWebs is TRUE.
6959         #
6960         #  @return New GEOM.GEOM_Object, containing the result shapes.
6961         #
6962         #  @ref tui_partition "Example"
6963         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6964                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6965                           KeepNonlimitShapes=0, theName=None):
6966             """
6967             Perform partition operation.
6968
6969             Parameters: 
6970                 ListShapes Shapes to be intersected.
6971                 ListTools Shapes to intersect theShapes.
6972                 Limit Type of resulting shapes (see geompy.ShapeType)
6973                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6974                       type will be detected automatically.
6975                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6976                                     target type (equal to Limit) are kept in the result,
6977                                     else standalone shapes of lower dimension
6978                                     are kept also (if they exist).
6979                 theName Object name; when specified, this parameter is used
6980                         for result publication in the study. Otherwise, if automatic
6981                         publication is switched on, default value is used for result name.
6982             Note:
6983                     Each compound from ListShapes and ListTools will be exploded
6984                     in order to avoid possible intersection between shapes from
6985                     this compound.
6986                     
6987             After implementation new version of PartitionAlgo (October 2006) other
6988             parameters are ignored by current functionality. They are kept in this
6989             function only for support old versions.
6990             
6991             Ignored parameters:
6992                 ListKeepInside Shapes, outside which the results will be deleted.
6993                                Each shape from theKeepInside must belong to theShapes also.
6994                 ListRemoveInside Shapes, inside which the results will be deleted.
6995                                  Each shape from theRemoveInside must belong to theShapes also.
6996                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6997                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6998
6999             Returns:   
7000                 New GEOM.GEOM_Object, containing the result shapes.
7001             """
7002             # Example: see GEOM_TestAll.py
7003             if Limit == self.ShapeType["AUTO"]:
7004                 # automatic detection of the most appropriate shape limit type
7005                 lim = GEOM.SHAPE
7006                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7007                 Limit = EnumToLong(lim)
7008                 pass
7009             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7010                                               ListKeepInside, ListRemoveInside,
7011                                               Limit, RemoveWebs, ListMaterials,
7012                                               KeepNonlimitShapes);
7013             RaiseIfFailed("MakePartition", self.BoolOp)
7014             self._autoPublish(anObj, theName, "partition")
7015             return anObj
7016
7017         ## Perform partition operation.
7018         #  This method may be useful if it is needed to make a partition for
7019         #  compound contains nonintersected shapes. Performance will be better
7020         #  since intersection between shapes from compound is not performed.
7021         #
7022         #  Description of all parameters as in previous method MakePartition()
7023         #
7024         #  @note Passed compounds (via ListShapes or via ListTools)
7025         #           have to consist of nonintersecting shapes.
7026         #
7027         #  @return New GEOM.GEOM_Object, containing the result shapes.
7028         #
7029         #  @ref swig_todo "Example"
7030         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7031                                                  ListKeepInside=[], ListRemoveInside=[],
7032                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7033                                                  ListMaterials=[], KeepNonlimitShapes=0,
7034                                                  theName=None):
7035             """
7036             Perform partition operation.
7037             This method may be useful if it is needed to make a partition for
7038             compound contains nonintersected shapes. Performance will be better
7039             since intersection between shapes from compound is not performed.
7040
7041             Parameters: 
7042                 Description of all parameters as in method geompy.MakePartition
7043         
7044             NOTE:
7045                 Passed compounds (via ListShapes or via ListTools)
7046                 have to consist of nonintersecting shapes.
7047
7048             Returns:   
7049                 New GEOM.GEOM_Object, containing the result shapes.
7050             """
7051             if Limit == self.ShapeType["AUTO"]:
7052                 # automatic detection of the most appropriate shape limit type
7053                 lim = GEOM.SHAPE
7054                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7055                 Limit = EnumToLong(lim)
7056                 pass
7057             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7058                                                                      ListKeepInside, ListRemoveInside,
7059                                                                      Limit, RemoveWebs, ListMaterials,
7060                                                                      KeepNonlimitShapes);
7061             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7062             self._autoPublish(anObj, theName, "partition")
7063             return anObj
7064
7065         ## See method MakePartition() for more information.
7066         #
7067         #  @ref tui_partition "Example 1"
7068         #  \n @ref swig_Partition "Example 2"
7069         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7070                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7071                       KeepNonlimitShapes=0, theName=None):
7072             """
7073             See method geompy.MakePartition for more information.
7074             """
7075             # Example: see GEOM_TestOthers.py
7076             # note: auto-publishing is done in self.MakePartition()
7077             anObj = self.MakePartition(ListShapes, ListTools,
7078                                        ListKeepInside, ListRemoveInside,
7079                                        Limit, RemoveWebs, ListMaterials,
7080                                        KeepNonlimitShapes, theName);
7081             return anObj
7082
7083         ## Perform partition of the Shape with the Plane
7084         #  @param theShape Shape to be intersected.
7085         #  @param thePlane Tool shape, to intersect theShape.
7086         #  @param theName Object name; when specified, this parameter is used
7087         #         for result publication in the study. Otherwise, if automatic
7088         #         publication is switched on, default value is used for result name.
7089         #
7090         #  @return New GEOM.GEOM_Object, containing the result shape.
7091         #
7092         #  @ref tui_partition "Example"
7093         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7094             """
7095             Perform partition of the Shape with the Plane
7096
7097             Parameters: 
7098                 theShape Shape to be intersected.
7099                 thePlane Tool shape, to intersect theShape.
7100                 theName Object name; when specified, this parameter is used
7101                         for result publication in the study. Otherwise, if automatic
7102                         publication is switched on, default value is used for result name.
7103
7104             Returns:  
7105                 New GEOM.GEOM_Object, containing the result shape.
7106             """
7107             # Example: see GEOM_TestAll.py
7108             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7109             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7110             self._autoPublish(anObj, theName, "partition")
7111             return anObj
7112
7113         # end of l3_basic_op
7114         ## @}
7115
7116         ## @addtogroup l3_transform
7117         ## @{
7118
7119         ## Translate the given object along the vector, specified
7120         #  by its end points.
7121         #  @param theObject The object to be translated.
7122         #  @param thePoint1 Start point of translation vector.
7123         #  @param thePoint2 End point of translation vector.
7124         #  @param theCopy Flag used to translate object itself or create a copy.
7125         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7126         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7127         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7128             """
7129             Translate the given object along the vector, specified by its end points.
7130
7131             Parameters: 
7132                 theObject The object to be translated.
7133                 thePoint1 Start point of translation vector.
7134                 thePoint2 End point of translation vector.
7135                 theCopy Flag used to translate object itself or create a copy.
7136
7137             Returns: 
7138                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7139                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7140             """
7141             if theCopy:
7142                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7143             else:
7144                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7145             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7146             return anObj
7147
7148         ## Translate the given object along the vector, specified
7149         #  by its end points, creating its copy before the translation.
7150         #  @param theObject The object to be translated.
7151         #  @param thePoint1 Start point of translation vector.
7152         #  @param thePoint2 End point of translation vector.
7153         #  @param theName Object name; when specified, this parameter is used
7154         #         for result publication in the study. Otherwise, if automatic
7155         #         publication is switched on, default value is used for result name.
7156         #
7157         #  @return New GEOM.GEOM_Object, containing the translated object.
7158         #
7159         #  @ref tui_translation "Example 1"
7160         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7161         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7162             """
7163             Translate the given object along the vector, specified
7164             by its end points, creating its copy before the translation.
7165
7166             Parameters: 
7167                 theObject The object to be translated.
7168                 thePoint1 Start point of translation vector.
7169                 thePoint2 End point of translation vector.
7170                 theName Object name; when specified, this parameter is used
7171                         for result publication in the study. Otherwise, if automatic
7172                         publication is switched on, default value is used for result name.
7173
7174             Returns:  
7175                 New GEOM.GEOM_Object, containing the translated object.
7176             """
7177             # Example: see GEOM_TestAll.py
7178             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7179             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7180             self._autoPublish(anObj, theName, "translated")
7181             return anObj
7182
7183         ## Translate the given object along the vector, specified by its components.
7184         #  @param theObject The object to be translated.
7185         #  @param theDX,theDY,theDZ Components of translation vector.
7186         #  @param theCopy Flag used to translate object itself or create a copy.
7187         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7188         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7189         #
7190         #  @ref tui_translation "Example"
7191         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7192             """
7193             Translate the given object along the vector, specified by its components.
7194
7195             Parameters: 
7196                 theObject The object to be translated.
7197                 theDX,theDY,theDZ Components of translation vector.
7198                 theCopy Flag used to translate object itself or create a copy.
7199
7200             Returns: 
7201                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7202                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7203             """
7204             # Example: see GEOM_TestAll.py
7205             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7206             if theCopy:
7207                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7208             else:
7209                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7210             anObj.SetParameters(Parameters)
7211             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7212             return anObj
7213
7214         ## Translate the given object along the vector, specified
7215         #  by its components, creating its copy before the translation.
7216         #  @param theObject The object to be translated.
7217         #  @param theDX,theDY,theDZ Components of translation vector.
7218         #  @param theName Object name; when specified, this parameter is used
7219         #         for result publication in the study. Otherwise, if automatic
7220         #         publication is switched on, default value is used for result name.
7221         #
7222         #  @return New GEOM.GEOM_Object, containing the translated object.
7223         #
7224         #  @ref tui_translation "Example"
7225         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7226             """
7227             Translate the given object along the vector, specified
7228             by its components, creating its copy before the translation.
7229
7230             Parameters: 
7231                 theObject The object to be translated.
7232                 theDX,theDY,theDZ Components of translation vector.
7233                 theName Object name; when specified, this parameter is used
7234                         for result publication in the study. Otherwise, if automatic
7235                         publication is switched on, default value is used for result name.
7236
7237             Returns: 
7238                 New GEOM.GEOM_Object, containing the translated object.
7239             """
7240             # Example: see GEOM_TestAll.py
7241             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7242             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7243             anObj.SetParameters(Parameters)
7244             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7245             self._autoPublish(anObj, theName, "translated")
7246             return anObj
7247
7248         ## Translate the given object along the given vector.
7249         #  @param theObject The object to be translated.
7250         #  @param theVector The translation vector.
7251         #  @param theCopy Flag used to translate object itself or create a copy.
7252         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7253         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7254         def TranslateVector(self, theObject, theVector, theCopy=False):
7255             """
7256             Translate the given object along the given vector.
7257
7258             Parameters: 
7259                 theObject The object to be translated.
7260                 theVector The translation vector.
7261                 theCopy Flag used to translate object itself or create a copy.
7262
7263             Returns: 
7264                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7265                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7266             """
7267             if theCopy:
7268                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7269             else:
7270                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7271             RaiseIfFailed("TranslateVector", self.TrsfOp)
7272             return anObj
7273
7274         ## Translate the given object along the given vector,
7275         #  creating its copy before the translation.
7276         #  @param theObject The object to be translated.
7277         #  @param theVector The translation vector.
7278         #  @param theName Object name; when specified, this parameter is used
7279         #         for result publication in the study. Otherwise, if automatic
7280         #         publication is switched on, default value is used for result name.
7281         #
7282         #  @return New GEOM.GEOM_Object, containing the translated object.
7283         #
7284         #  @ref tui_translation "Example"
7285         def MakeTranslationVector(self, theObject, theVector, theName=None):
7286             """
7287             Translate the given object along the given vector,
7288             creating its copy before the translation.
7289
7290             Parameters: 
7291                 theObject The object to be translated.
7292                 theVector The translation vector.
7293                 theName Object name; when specified, this parameter is used
7294                         for result publication in the study. Otherwise, if automatic
7295                         publication is switched on, default value is used for result name.
7296
7297             Returns: 
7298                 New GEOM.GEOM_Object, containing the translated object.
7299             """
7300             # Example: see GEOM_TestAll.py
7301             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7302             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7303             self._autoPublish(anObj, theName, "translated")
7304             return anObj
7305
7306         ## Translate the given object along the given vector on given distance.
7307         #  @param theObject The object to be translated.
7308         #  @param theVector The translation vector.
7309         #  @param theDistance The translation distance.
7310         #  @param theCopy Flag used to translate object itself or create a copy.
7311         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7312         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7313         #
7314         #  @ref tui_translation "Example"
7315         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7316             """
7317             Translate the given object along the given vector on given distance.
7318
7319             Parameters: 
7320                 theObject The object to be translated.
7321                 theVector The translation vector.
7322                 theDistance The translation distance.
7323                 theCopy Flag used to translate object itself or create a copy.
7324
7325             Returns: 
7326                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7327                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7328             """
7329             # Example: see GEOM_TestAll.py
7330             theDistance,Parameters = ParseParameters(theDistance)
7331             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7332             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7333             anObj.SetParameters(Parameters)
7334             return anObj
7335
7336         ## Translate the given object along the given vector on given distance,
7337         #  creating its copy before the translation.
7338         #  @param theObject The object to be translated.
7339         #  @param theVector The translation vector.
7340         #  @param theDistance The translation distance.
7341         #  @param theName Object name; when specified, this parameter is used
7342         #         for result publication in the study. Otherwise, if automatic
7343         #         publication is switched on, default value is used for result name.
7344         #
7345         #  @return New GEOM.GEOM_Object, containing the translated object.
7346         #
7347         #  @ref tui_translation "Example"
7348         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7349             """
7350             Translate the given object along the given vector on given distance,
7351             creating its copy before the translation.
7352
7353             Parameters:
7354                 theObject The object to be translated.
7355                 theVector The translation vector.
7356                 theDistance The translation distance.
7357                 theName Object name; when specified, this parameter is used
7358                         for result publication in the study. Otherwise, if automatic
7359                         publication is switched on, default value is used for result name.
7360
7361             Returns: 
7362                 New GEOM.GEOM_Object, containing the translated object.
7363             """
7364             # Example: see GEOM_TestAll.py
7365             theDistance,Parameters = ParseParameters(theDistance)
7366             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7367             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7368             anObj.SetParameters(Parameters)
7369             self._autoPublish(anObj, theName, "translated")
7370             return anObj
7371
7372         ## Rotate the given object around the given axis on the given angle.
7373         #  @param theObject The object to be rotated.
7374         #  @param theAxis Rotation axis.
7375         #  @param theAngle Rotation angle in radians.
7376         #  @param theCopy Flag used to rotate object itself or create a copy.
7377         #
7378         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7379         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7380         #
7381         #  @ref tui_rotation "Example"
7382         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7383             """
7384             Rotate the given object around the given axis on the given angle.
7385
7386             Parameters:
7387                 theObject The object to be rotated.
7388                 theAxis Rotation axis.
7389                 theAngle Rotation angle in radians.
7390                 theCopy Flag used to rotate object itself or create a copy.
7391
7392             Returns:
7393                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7394                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7395             """
7396             # Example: see GEOM_TestAll.py
7397             flag = False
7398             if isinstance(theAngle,str):
7399                 flag = True
7400             theAngle, Parameters = ParseParameters(theAngle)
7401             if flag:
7402                 theAngle = theAngle*math.pi/180.0
7403             if theCopy:
7404                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7405             else:
7406                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7407             RaiseIfFailed("Rotate", self.TrsfOp)
7408             anObj.SetParameters(Parameters)
7409             return anObj
7410
7411         ## Rotate the given object around the given axis
7412         #  on the given angle, creating its copy before the rotatation.
7413         #  @param theObject The object to be rotated.
7414         #  @param theAxis Rotation axis.
7415         #  @param theAngle Rotation angle in radians.
7416         #  @param theName Object name; when specified, this parameter is used
7417         #         for result publication in the study. Otherwise, if automatic
7418         #         publication is switched on, default value is used for result name.
7419         #
7420         #  @return New GEOM.GEOM_Object, containing the rotated object.
7421         #
7422         #  @ref tui_rotation "Example"
7423         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7424             """
7425             Rotate the given object around the given axis
7426             on the given angle, creating its copy before the rotatation.
7427
7428             Parameters:
7429                 theObject The object to be rotated.
7430                 theAxis Rotation axis.
7431                 theAngle Rotation angle in radians.
7432                 theName Object name; when specified, this parameter is used
7433                         for result publication in the study. Otherwise, if automatic
7434                         publication is switched on, default value is used for result name.
7435
7436             Returns:
7437                 New GEOM.GEOM_Object, containing the rotated object.
7438             """
7439             # Example: see GEOM_TestAll.py
7440             flag = False
7441             if isinstance(theAngle,str):
7442                 flag = True
7443             theAngle, Parameters = ParseParameters(theAngle)
7444             if flag:
7445                 theAngle = theAngle*math.pi/180.0
7446             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7447             RaiseIfFailed("RotateCopy", self.TrsfOp)
7448             anObj.SetParameters(Parameters)
7449             self._autoPublish(anObj, theName, "rotated")
7450             return anObj
7451
7452         ## Rotate given object around vector perpendicular to plane
7453         #  containing three points.
7454         #  @param theObject The object to be rotated.
7455         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7456         #  containing the three points.
7457         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7458         #  @param theCopy Flag used to rotate object itself or create a copy.
7459         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7460         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7461         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7462             """
7463             Rotate given object around vector perpendicular to plane
7464             containing three points.
7465
7466             Parameters:
7467                 theObject The object to be rotated.
7468                 theCentPoint central point  the axis is the vector perpendicular to the plane
7469                              containing the three points.
7470                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7471                 theCopy Flag used to rotate object itself or create a copy.
7472
7473             Returns:
7474                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7475                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7476             """
7477             if theCopy:
7478                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7479             else:
7480                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7481             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7482             return anObj
7483
7484         ## Rotate given object around vector perpendicular to plane
7485         #  containing three points, creating its copy before the rotatation.
7486         #  @param theObject The object to be rotated.
7487         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7488         #  containing the three points.
7489         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7490         #  @param theName Object name; when specified, this parameter is used
7491         #         for result publication in the study. Otherwise, if automatic
7492         #         publication is switched on, default value is used for result name.
7493         #
7494         #  @return New GEOM.GEOM_Object, containing the rotated object.
7495         #
7496         #  @ref tui_rotation "Example"
7497         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7498             """
7499             Rotate given object around vector perpendicular to plane
7500             containing three points, creating its copy before the rotatation.
7501
7502             Parameters:
7503                 theObject The object to be rotated.
7504                 theCentPoint central point  the axis is the vector perpendicular to the plane
7505                              containing the three points.
7506                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7507                 theName Object name; when specified, this parameter is used
7508                         for result publication in the study. Otherwise, if automatic
7509                         publication is switched on, default value is used for result name.
7510
7511             Returns:
7512                 New GEOM.GEOM_Object, containing the rotated object.
7513             """
7514             # Example: see GEOM_TestAll.py
7515             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7516             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7517             self._autoPublish(anObj, theName, "rotated")
7518             return anObj
7519
7520         ## Scale the given object by the specified factor.
7521         #  @param theObject The object to be scaled.
7522         #  @param thePoint Center point for scaling.
7523         #                  Passing None for it means scaling relatively the origin of global CS.
7524         #  @param theFactor Scaling factor value.
7525         #  @param theCopy Flag used to scale object itself or create a copy.
7526         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7527         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7528         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7529             """
7530             Scale the given object by the specified factor.
7531
7532             Parameters:
7533                 theObject The object to be scaled.
7534                 thePoint Center point for scaling.
7535                          Passing None for it means scaling relatively the origin of global CS.
7536                 theFactor Scaling factor value.
7537                 theCopy Flag used to scale object itself or create a copy.
7538
7539             Returns:    
7540                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7541                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7542             """
7543             # Example: see GEOM_TestAll.py
7544             theFactor, Parameters = ParseParameters(theFactor)
7545             if theCopy:
7546                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7547             else:
7548                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7549             RaiseIfFailed("Scale", self.TrsfOp)
7550             anObj.SetParameters(Parameters)
7551             return anObj
7552
7553         ## Scale the given object by the factor, creating its copy before the scaling.
7554         #  @param theObject The object to be scaled.
7555         #  @param thePoint Center point for scaling.
7556         #                  Passing None for it means scaling relatively the origin of global CS.
7557         #  @param theFactor Scaling factor value.
7558         #  @param theName Object name; when specified, this parameter is used
7559         #         for result publication in the study. Otherwise, if automatic
7560         #         publication is switched on, default value is used for result name.
7561         #
7562         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7563         #
7564         #  @ref tui_scale "Example"
7565         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7566             """
7567             Scale the given object by the factor, creating its copy before the scaling.
7568
7569             Parameters:
7570                 theObject The object to be scaled.
7571                 thePoint Center point for scaling.
7572                          Passing None for it means scaling relatively the origin of global CS.
7573                 theFactor Scaling factor value.
7574                 theName Object name; when specified, this parameter is used
7575                         for result publication in the study. Otherwise, if automatic
7576                         publication is switched on, default value is used for result name.
7577
7578             Returns:    
7579                 New GEOM.GEOM_Object, containing the scaled shape.
7580             """
7581             # Example: see GEOM_TestAll.py
7582             theFactor, Parameters = ParseParameters(theFactor)
7583             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7584             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7585             anObj.SetParameters(Parameters)
7586             self._autoPublish(anObj, theName, "scaled")
7587             return anObj
7588
7589         ## Scale the given object by different factors along coordinate axes.
7590         #  @param theObject The object to be scaled.
7591         #  @param thePoint Center point for scaling.
7592         #                  Passing None for it means scaling relatively the origin of global CS.
7593         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7594         #  @param theCopy Flag used to scale object itself or create a copy.
7595         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7596         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7597         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7598             """
7599             Scale the given object by different factors along coordinate axes.
7600
7601             Parameters:
7602                 theObject The object to be scaled.
7603                 thePoint Center point for scaling.
7604                             Passing None for it means scaling relatively the origin of global CS.
7605                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7606                 theCopy Flag used to scale object itself or create a copy.
7607
7608             Returns:    
7609                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7610                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7611             """
7612             # Example: see GEOM_TestAll.py
7613             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7614             if theCopy:
7615                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7616                                                             theFactorX, theFactorY, theFactorZ)
7617             else:
7618                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7619                                                         theFactorX, theFactorY, theFactorZ)
7620             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7621             anObj.SetParameters(Parameters)
7622             return anObj
7623
7624         ## Scale the given object by different factors along coordinate axes,
7625         #  creating its copy before the scaling.
7626         #  @param theObject The object to be scaled.
7627         #  @param thePoint Center point for scaling.
7628         #                  Passing None for it means scaling relatively the origin of global CS.
7629         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7630         #  @param theName Object name; when specified, this parameter is used
7631         #         for result publication in the study. Otherwise, if automatic
7632         #         publication is switched on, default value is used for result name.
7633         #
7634         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7635         #
7636         #  @ref swig_scale "Example"
7637         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7638             """
7639             Scale the given object by different factors along coordinate axes,
7640             creating its copy before the scaling.
7641
7642             Parameters:
7643                 theObject The object to be scaled.
7644                 thePoint Center point for scaling.
7645                             Passing None for it means scaling relatively the origin of global CS.
7646                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7647                 theName Object name; when specified, this parameter is used
7648                         for result publication in the study. Otherwise, if automatic
7649                         publication is switched on, default value is used for result name.
7650
7651             Returns:
7652                 New GEOM.GEOM_Object, containing the scaled shape.
7653             """
7654             # Example: see GEOM_TestAll.py
7655             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7656             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7657                                                         theFactorX, theFactorY, theFactorZ)
7658             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7659             anObj.SetParameters(Parameters)
7660             self._autoPublish(anObj, theName, "scaled")
7661             return anObj
7662
7663         ## Mirror an object relatively the given plane.
7664         #  @param theObject The object to be mirrored.
7665         #  @param thePlane Plane of symmetry.
7666         #  @param theCopy Flag used to mirror object itself or create a copy.
7667         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7668         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7669         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7670             """
7671             Mirror an object relatively the given plane.
7672
7673             Parameters:
7674                 theObject The object to be mirrored.
7675                 thePlane Plane of symmetry.
7676                 theCopy Flag used to mirror object itself or create a copy.
7677
7678             Returns:
7679                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7680                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7681             """
7682             if theCopy:
7683                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7684             else:
7685                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7686             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7687             return anObj
7688
7689         ## Create an object, symmetrical
7690         #  to the given one relatively the given plane.
7691         #  @param theObject The object to be mirrored.
7692         #  @param thePlane Plane of symmetry.
7693         #  @param theName Object name; when specified, this parameter is used
7694         #         for result publication in the study. Otherwise, if automatic
7695         #         publication is switched on, default value is used for result name.
7696         #
7697         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7698         #
7699         #  @ref tui_mirror "Example"
7700         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7701             """
7702             Create an object, symmetrical to the given one relatively the given plane.
7703
7704             Parameters:
7705                 theObject The object to be mirrored.
7706                 thePlane Plane of symmetry.
7707                 theName Object name; when specified, this parameter is used
7708                         for result publication in the study. Otherwise, if automatic
7709                         publication is switched on, default value is used for result name.
7710
7711             Returns:
7712                 New GEOM.GEOM_Object, containing the mirrored shape.
7713             """
7714             # Example: see GEOM_TestAll.py
7715             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7716             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7717             self._autoPublish(anObj, theName, "mirrored")
7718             return anObj
7719
7720         ## Mirror an object relatively the given axis.
7721         #  @param theObject The object to be mirrored.
7722         #  @param theAxis Axis of symmetry.
7723         #  @param theCopy Flag used to mirror object itself or create a copy.
7724         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7725         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7726         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7727             """
7728             Mirror an object relatively the given axis.
7729
7730             Parameters:
7731                 theObject The object to be mirrored.
7732                 theAxis Axis of symmetry.
7733                 theCopy Flag used to mirror object itself or create a copy.
7734
7735             Returns:
7736                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7737                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7738             """
7739             if theCopy:
7740                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7741             else:
7742                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7743             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7744             return anObj
7745
7746         ## Create an object, symmetrical
7747         #  to the given one relatively the given axis.
7748         #  @param theObject The object to be mirrored.
7749         #  @param theAxis Axis of symmetry.
7750         #  @param theName Object name; when specified, this parameter is used
7751         #         for result publication in the study. Otherwise, if automatic
7752         #         publication is switched on, default value is used for result name.
7753         #
7754         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7755         #
7756         #  @ref tui_mirror "Example"
7757         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7758             """
7759             Create an object, symmetrical to the given one relatively the given axis.
7760
7761             Parameters:
7762                 theObject The object to be mirrored.
7763                 theAxis Axis of symmetry.
7764                 theName Object name; when specified, this parameter is used
7765                         for result publication in the study. Otherwise, if automatic
7766                         publication is switched on, default value is used for result name.
7767
7768             Returns: 
7769                 New GEOM.GEOM_Object, containing the mirrored shape.
7770             """
7771             # Example: see GEOM_TestAll.py
7772             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7773             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7774             self._autoPublish(anObj, theName, "mirrored")
7775             return anObj
7776
7777         ## Mirror an object relatively the given point.
7778         #  @param theObject The object to be mirrored.
7779         #  @param thePoint Point of symmetry.
7780         #  @param theCopy Flag used to mirror object itself or create a copy.
7781         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7782         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7783         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7784             """
7785             Mirror an object relatively the given point.
7786
7787             Parameters:
7788                 theObject The object to be mirrored.
7789                 thePoint Point of symmetry.
7790                 theCopy Flag used to mirror object itself or create a copy.
7791
7792             Returns:
7793                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7794                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7795             """
7796             # Example: see GEOM_TestAll.py
7797             if theCopy:
7798                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7799             else:
7800                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7801             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7802             return anObj
7803
7804         ## Create an object, symmetrical
7805         #  to the given one relatively the given point.
7806         #  @param theObject The object to be mirrored.
7807         #  @param thePoint Point of symmetry.
7808         #  @param theName Object name; when specified, this parameter is used
7809         #         for result publication in the study. Otherwise, if automatic
7810         #         publication is switched on, default value is used for result name.
7811         #
7812         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7813         #
7814         #  @ref tui_mirror "Example"
7815         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7816             """
7817             Create an object, symmetrical
7818             to the given one relatively the given point.
7819
7820             Parameters:
7821                 theObject The object to be mirrored.
7822                 thePoint Point of symmetry.
7823                 theName Object name; when specified, this parameter is used
7824                         for result publication in the study. Otherwise, if automatic
7825                         publication is switched on, default value is used for result name.
7826
7827             Returns:  
7828                 New GEOM.GEOM_Object, containing the mirrored shape.
7829             """
7830             # Example: see GEOM_TestAll.py
7831             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7832             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7833             self._autoPublish(anObj, theName, "mirrored")
7834             return anObj
7835
7836         ## Modify the location of the given object.
7837         #  @param theObject The object to be displaced.
7838         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7839         #                     If \a theStartLCS is NULL, displacement
7840         #                     will be performed from global CS.\n
7841         #                     If \a theObject itself is used as \a theStartLCS,
7842         #                     its location will be changed to \a theEndLCS.
7843         #  @param theEndLCS Coordinate system to perform displacement to it.
7844         #  @param theCopy Flag used to displace object itself or create a copy.
7845         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7846         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7847         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7848             """
7849             Modify the Location of the given object by LCS, creating its copy before the setting.
7850
7851             Parameters:
7852                 theObject The object to be displaced.
7853                 theStartLCS Coordinate system to perform displacement from it.
7854                             If theStartLCS is NULL, displacement
7855                             will be performed from global CS.
7856                             If theObject itself is used as theStartLCS,
7857                             its location will be changed to theEndLCS.
7858                 theEndLCS Coordinate system to perform displacement to it.
7859                 theCopy Flag used to displace object itself or create a copy.
7860
7861             Returns:
7862                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7863                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7864             """
7865             # Example: see GEOM_TestAll.py
7866             if theCopy:
7867                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7868             else:
7869                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7870             RaiseIfFailed("Displace", self.TrsfOp)
7871             return anObj
7872
7873         ## Modify the Location of the given object by LCS,
7874         #  creating its copy before the setting.
7875         #  @param theObject The object to be displaced.
7876         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7877         #                     If \a theStartLCS is NULL, displacement
7878         #                     will be performed from global CS.\n
7879         #                     If \a theObject itself is used as \a theStartLCS,
7880         #                     its location will be changed to \a theEndLCS.
7881         #  @param theEndLCS Coordinate system to perform displacement to it.
7882         #  @param theName Object name; when specified, this parameter is used
7883         #         for result publication in the study. Otherwise, if automatic
7884         #         publication is switched on, default value is used for result name.
7885         #
7886         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7887         #
7888         #  @ref tui_modify_location "Example"
7889         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7890             """
7891             Modify the Location of the given object by LCS, creating its copy before the setting.
7892
7893             Parameters:
7894                 theObject The object to be displaced.
7895                 theStartLCS Coordinate system to perform displacement from it.
7896                             If theStartLCS is NULL, displacement
7897                             will be performed from global CS.
7898                             If theObject itself is used as theStartLCS,
7899                             its location will be changed to theEndLCS.
7900                 theEndLCS Coordinate system to perform displacement to it.
7901                 theName Object name; when specified, this parameter is used
7902                         for result publication in the study. Otherwise, if automatic
7903                         publication is switched on, default value is used for result name.
7904
7905             Returns:  
7906                 New GEOM.GEOM_Object, containing the displaced shape.
7907
7908             Example of usage:
7909                 # create local coordinate systems
7910                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7911                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7912                 # modify the location of the given object
7913                 position = geompy.MakePosition(cylinder, cs1, cs2)
7914             """
7915             # Example: see GEOM_TestAll.py
7916             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7917             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7918             self._autoPublish(anObj, theName, "displaced")
7919             return anObj
7920
7921         ## Modify the Location of the given object by Path.
7922         #  @param  theObject The object to be displaced.
7923         #  @param  thePath Wire or Edge along that the object will be translated.
7924         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7925         #  @param  theCopy is to create a copy objects if true.
7926         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7927         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7928         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7929         #
7930         #  @ref tui_modify_location "Example"
7931         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7932             """
7933             Modify the Location of the given object by Path.
7934
7935             Parameters:
7936                  theObject The object to be displaced.
7937                  thePath Wire or Edge along that the object will be translated.
7938                  theDistance progress of Path (0 = start location, 1 = end of path location).
7939                  theCopy is to create a copy objects if true.
7940                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7941
7942             Returns:  
7943                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7944                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7945
7946             Example of usage:
7947                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7948             """
7949             # Example: see GEOM_TestAll.py
7950             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7951             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7952             return anObj
7953
7954         ## Modify the Location of the given object by Path, creating its copy before the operation.
7955         #  @param theObject The object to be displaced.
7956         #  @param thePath Wire or Edge along that the object will be translated.
7957         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7958         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7959         #  @param theName Object name; when specified, this parameter is used
7960         #         for result publication in the study. Otherwise, if automatic
7961         #         publication is switched on, default value is used for result name.
7962         #
7963         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7964         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7965             """
7966             Modify the Location of the given object by Path, creating its copy before the operation.
7967
7968             Parameters:
7969                  theObject The object to be displaced.
7970                  thePath Wire or Edge along that the object will be translated.
7971                  theDistance progress of Path (0 = start location, 1 = end of path location).
7972                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7973                  theName Object name; when specified, this parameter is used
7974                          for result publication in the study. Otherwise, if automatic
7975                          publication is switched on, default value is used for result name.
7976
7977             Returns:  
7978                 New GEOM.GEOM_Object, containing the displaced shape.
7979             """
7980             # Example: see GEOM_TestAll.py
7981             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7982             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7983             self._autoPublish(anObj, theName, "displaced")
7984             return anObj
7985
7986         ## Offset given shape.
7987         #  @param theObject The base object for the offset.
7988         #  @param theOffset Offset value.
7989         #  @param theCopy Flag used to offset object itself or create a copy.
7990         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7991         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7992         def Offset(self, theObject, theOffset, theCopy=False):
7993             """
7994             Offset given shape.
7995
7996             Parameters:
7997                 theObject The base object for the offset.
7998                 theOffset Offset value.
7999                 theCopy Flag used to offset object itself or create a copy.
8000
8001             Returns: 
8002                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8003                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8004             """
8005             theOffset, Parameters = ParseParameters(theOffset)
8006             if theCopy:
8007                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8008             else:
8009                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8010             RaiseIfFailed("Offset", self.TrsfOp)
8011             anObj.SetParameters(Parameters)
8012             return anObj
8013
8014         ## Create new object as offset of the given one.
8015         #  @param theObject The base object for the offset.
8016         #  @param theOffset Offset value.
8017         #  @param theName Object name; when specified, this parameter is used
8018         #         for result publication in the study. Otherwise, if automatic
8019         #         publication is switched on, default value is used for result name.
8020         #
8021         #  @return New GEOM.GEOM_Object, containing the offset object.
8022         #
8023         #  @ref tui_offset "Example"
8024         def MakeOffset(self, theObject, theOffset, theName=None):
8025             """
8026             Create new object as offset of the given one.
8027
8028             Parameters:
8029                 theObject The base object for the offset.
8030                 theOffset Offset value.
8031                 theName Object name; when specified, this parameter is used
8032                         for result publication in the study. Otherwise, if automatic
8033                         publication is switched on, default value is used for result name.
8034
8035             Returns:  
8036                 New GEOM.GEOM_Object, containing the offset object.
8037
8038             Example of usage:
8039                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8040                  # create a new object as offset of the given object
8041                  offset = geompy.MakeOffset(box, 70.)
8042             """
8043             # Example: see GEOM_TestAll.py
8044             theOffset, Parameters = ParseParameters(theOffset)
8045             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8046             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8047             anObj.SetParameters(Parameters)
8048             self._autoPublish(anObj, theName, "offset")
8049             return anObj
8050
8051         ## Create new object as projection of the given one on a 2D surface.
8052         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8053         #  @param theTarget The target object. It can be planar or cylindrical face.
8054         #  @param theName Object name; when specified, this parameter is used
8055         #         for result publication in the study. Otherwise, if automatic
8056         #         publication is switched on, default value is used for result name.
8057         #
8058         #  @return New GEOM.GEOM_Object, containing the projection.
8059         #
8060         #  @ref tui_projection "Example"
8061         def MakeProjection(self, theSource, theTarget, theName=None):
8062             """
8063             Create new object as projection of the given one on a 2D surface.
8064
8065             Parameters:
8066                 theSource The source object for the projection. It can be a point, edge or wire.
8067                 theTarget The target object. It can be planar or cylindrical face.
8068                 theName Object name; when specified, this parameter is used
8069                         for result publication in the study. Otherwise, if automatic
8070                         publication is switched on, default value is used for result name.
8071
8072             Returns:  
8073                 New GEOM.GEOM_Object, containing the projection.
8074             """
8075             # Example: see GEOM_TestAll.py
8076             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8077             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8078             self._autoPublish(anObj, theName, "projection")
8079             return anObj
8080             
8081         ## Create a projection projection of the given point on a wire or an edge.
8082         #  If there are no solutions or there are 2 or more solutions It throws an
8083         #  exception.
8084         #  @param thePoint the point to be projected.
8085         #  @param theWire the wire. The edge is accepted as well.
8086         #  @param theName Object name; when specified, this parameter is used
8087         #         for result publication in the study. Otherwise, if automatic
8088         #         publication is switched on, default value is used for result name.
8089         #
8090         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8091         #  \n \a u: The parameter of projection point on edge.
8092         #  \n \a PointOnEdge: The projection point.
8093         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8094         #
8095         #  @ref tui_projection "Example"
8096         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8097             """
8098             Create a projection projection of the given point on a wire or an edge.
8099             If there are no solutions or there are 2 or more solutions It throws an
8100             exception.
8101             
8102             Parameters:
8103                 thePoint the point to be projected.
8104                 theWire the wire. The edge is accepted as well.
8105                 theName Object name; when specified, this parameter is used
8106                         for result publication in the study. Otherwise, if automatic
8107                         publication is switched on, default value is used for result name.
8108           
8109             Returns:
8110                 [u, PointOnEdge, EdgeInWireIndex]
8111                  u: The parameter of projection point on edge.
8112                  PointOnEdge: The projection point.
8113                  EdgeInWireIndex: The index of an edge in a wire.
8114             """
8115             # Example: see GEOM_TestAll.py
8116             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8117             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8118             self._autoPublish(anObj[1], theName, "projection")
8119             return anObj
8120
8121         # -----------------------------------------------------------------------------
8122         # Patterns
8123         # -----------------------------------------------------------------------------
8124
8125         ## Translate the given object along the given vector a given number times
8126         #  @param theObject The object to be translated.
8127         #  @param theVector Direction of the translation. DX if None.
8128         #  @param theStep Distance to translate on.
8129         #  @param theNbTimes Quantity of translations to be done.
8130         #  @param theName Object name; when specified, this parameter is used
8131         #         for result publication in the study. Otherwise, if automatic
8132         #         publication is switched on, default value is used for result name.
8133         #
8134         #  @return New GEOM.GEOM_Object, containing compound of all
8135         #          the shapes, obtained after each translation.
8136         #
8137         #  @ref tui_multi_translation "Example"
8138         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8139             """
8140             Translate the given object along the given vector a given number times
8141
8142             Parameters:
8143                 theObject The object to be translated.
8144                 theVector Direction of the translation. DX if None.
8145                 theStep Distance to translate on.
8146                 theNbTimes Quantity of translations to be done.
8147                 theName Object name; when specified, this parameter is used
8148                         for result publication in the study. Otherwise, if automatic
8149                         publication is switched on, default value is used for result name.
8150
8151             Returns:     
8152                 New GEOM.GEOM_Object, containing compound of all
8153                 the shapes, obtained after each translation.
8154
8155             Example of usage:
8156                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8157             """
8158             # Example: see GEOM_TestAll.py
8159             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8160             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8161             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8162             anObj.SetParameters(Parameters)
8163             self._autoPublish(anObj, theName, "multitranslation")
8164             return anObj
8165
8166         ## Conseqently apply two specified translations to theObject specified number of times.
8167         #  @param theObject The object to be translated.
8168         #  @param theVector1 Direction of the first translation. DX if None.
8169         #  @param theStep1 Step of the first translation.
8170         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8171         #  @param theVector2 Direction of the second translation. DY if None.
8172         #  @param theStep2 Step of the second translation.
8173         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8174         #  @param theName Object name; when specified, this parameter is used
8175         #         for result publication in the study. Otherwise, if automatic
8176         #         publication is switched on, default value is used for result name.
8177         #
8178         #  @return New GEOM.GEOM_Object, containing compound of all
8179         #          the shapes, obtained after each translation.
8180         #
8181         #  @ref tui_multi_translation "Example"
8182         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8183                                    theVector2, theStep2, theNbTimes2, theName=None):
8184             """
8185             Conseqently apply two specified translations to theObject specified number of times.
8186
8187             Parameters:
8188                 theObject The object to be translated.
8189                 theVector1 Direction of the first translation. DX if None.
8190                 theStep1 Step of the first translation.
8191                 theNbTimes1 Quantity of translations to be done along theVector1.
8192                 theVector2 Direction of the second translation. DY if None.
8193                 theStep2 Step of the second translation.
8194                 theNbTimes2 Quantity of translations to be done along theVector2.
8195                 theName Object name; when specified, this parameter is used
8196                         for result publication in the study. Otherwise, if automatic
8197                         publication is switched on, default value is used for result name.
8198
8199             Returns:
8200                 New GEOM.GEOM_Object, containing compound of all
8201                 the shapes, obtained after each translation.
8202
8203             Example of usage:
8204                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8205             """
8206             # Example: see GEOM_TestAll.py
8207             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8208             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8209                                                  theVector2, theStep2, theNbTimes2)
8210             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8211             anObj.SetParameters(Parameters)
8212             self._autoPublish(anObj, theName, "multitranslation")
8213             return anObj
8214
8215         ## Rotate the given object around the given axis a given number times.
8216         #  Rotation angle will be 2*PI/theNbTimes.
8217         #  @param theObject The object to be rotated.
8218         #  @param theAxis The rotation axis. DZ if None.
8219         #  @param theNbTimes Quantity of rotations to be done.
8220         #  @param theName Object name; when specified, this parameter is used
8221         #         for result publication in the study. Otherwise, if automatic
8222         #         publication is switched on, default value is used for result name.
8223         #
8224         #  @return New GEOM.GEOM_Object, containing compound of all the
8225         #          shapes, obtained after each rotation.
8226         #
8227         #  @ref tui_multi_rotation "Example"
8228         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8229             """
8230             Rotate the given object around the given axis a given number times.
8231             Rotation angle will be 2*PI/theNbTimes.
8232
8233             Parameters:
8234                 theObject The object to be rotated.
8235                 theAxis The rotation axis. DZ if None.
8236                 theNbTimes Quantity of rotations to be done.
8237                 theName Object name; when specified, this parameter is used
8238                         for result publication in the study. Otherwise, if automatic
8239                         publication is switched on, default value is used for result name.
8240
8241             Returns:     
8242                 New GEOM.GEOM_Object, containing compound of all the
8243                 shapes, obtained after each rotation.
8244
8245             Example of usage:
8246                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8247             """
8248             # Example: see GEOM_TestAll.py
8249             theNbTimes, Parameters = ParseParameters(theNbTimes)
8250             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8251             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8252             anObj.SetParameters(Parameters)
8253             self._autoPublish(anObj, theName, "multirotation")
8254             return anObj
8255
8256         ## Rotate the given object around the given axis
8257         #  a given number times on the given angle.
8258         #  @param theObject The object to be rotated.
8259         #  @param theAxis The rotation axis. DZ if None.
8260         #  @param theAngleStep Rotation angle in radians.
8261         #  @param theNbTimes Quantity of rotations to be done.
8262         #  @param theName Object name; when specified, this parameter is used
8263         #         for result publication in the study. Otherwise, if automatic
8264         #         publication is switched on, default value is used for result name.
8265         #
8266         #  @return New GEOM.GEOM_Object, containing compound of all the
8267         #          shapes, obtained after each rotation.
8268         #
8269         #  @ref tui_multi_rotation "Example"
8270         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8271             """
8272             Rotate the given object around the given axis
8273             a given number times on the given angle.
8274
8275             Parameters:
8276                 theObject The object to be rotated.
8277                 theAxis The rotation axis. DZ if None.
8278                 theAngleStep Rotation angle in radians.
8279                 theNbTimes Quantity of rotations to be done.
8280                 theName Object name; when specified, this parameter is used
8281                         for result publication in the study. Otherwise, if automatic
8282                         publication is switched on, default value is used for result name.
8283
8284             Returns:     
8285                 New GEOM.GEOM_Object, containing compound of all the
8286                 shapes, obtained after each rotation.
8287
8288             Example of usage:
8289                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8290             """
8291             # Example: see GEOM_TestAll.py
8292             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8293             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8294             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8295             anObj.SetParameters(Parameters)
8296             self._autoPublish(anObj, theName, "multirotation")
8297             return anObj
8298
8299         ## Rotate the given object around the given axis a given
8300         #  number times and multi-translate each rotation result.
8301         #  Rotation angle will be 2*PI/theNbTimes1.
8302         #  Translation direction passes through center of gravity
8303         #  of rotated shape and its projection on the rotation axis.
8304         #  @param theObject The object to be rotated.
8305         #  @param theAxis Rotation axis. DZ if None.
8306         #  @param theNbTimes1 Quantity of rotations to be done.
8307         #  @param theRadialStep Translation distance.
8308         #  @param theNbTimes2 Quantity of translations to be done.
8309         #  @param theName Object name; when specified, this parameter is used
8310         #         for result publication in the study. Otherwise, if automatic
8311         #         publication is switched on, default value is used for result name.
8312         #
8313         #  @return New GEOM.GEOM_Object, containing compound of all the
8314         #          shapes, obtained after each transformation.
8315         #
8316         #  @ref tui_multi_rotation "Example"
8317         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8318             """
8319             Rotate the given object around the
8320             given axis on the given angle a given number
8321             times and multi-translate each rotation result.
8322             Translation direction passes through center of gravity
8323             of rotated shape and its projection on the rotation axis.
8324
8325             Parameters:
8326                 theObject The object to be rotated.
8327                 theAxis Rotation axis. DZ if None.
8328                 theNbTimes1 Quantity of rotations to be done.
8329                 theRadialStep Translation distance.
8330                 theNbTimes2 Quantity of translations to be done.
8331                 theName Object name; when specified, this parameter is used
8332                         for result publication in the study. Otherwise, if automatic
8333                         publication is switched on, default value is used for result name.
8334
8335             Returns:    
8336                 New GEOM.GEOM_Object, containing compound of all the
8337                 shapes, obtained after each transformation.
8338
8339             Example of usage:
8340                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8341             """
8342             # Example: see GEOM_TestAll.py
8343             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8344             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8345             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8346             anObj.SetParameters(Parameters)
8347             self._autoPublish(anObj, theName, "multirotation")
8348             return anObj
8349
8350         ## Rotate the given object around the
8351         #  given axis on the given angle a given number
8352         #  times and multi-translate each rotation result.
8353         #  Translation direction passes through center of gravity
8354         #  of rotated shape and its projection on the rotation axis.
8355         #  @param theObject The object to be rotated.
8356         #  @param theAxis Rotation axis. DZ if None.
8357         #  @param theAngleStep Rotation angle in radians.
8358         #  @param theNbTimes1 Quantity of rotations to be done.
8359         #  @param theRadialStep Translation distance.
8360         #  @param theNbTimes2 Quantity of translations to be done.
8361         #  @param theName Object name; when specified, this parameter is used
8362         #         for result publication in the study. Otherwise, if automatic
8363         #         publication is switched on, default value is used for result name.
8364         #
8365         #  @return New GEOM.GEOM_Object, containing compound of all the
8366         #          shapes, obtained after each transformation.
8367         #
8368         #  @ref tui_multi_rotation "Example"
8369         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8370             """
8371             Rotate the given object around the
8372             given axis on the given angle a given number
8373             times and multi-translate each rotation result.
8374             Translation direction passes through center of gravity
8375             of rotated shape and its projection on the rotation axis.
8376
8377             Parameters:
8378                 theObject The object to be rotated.
8379                 theAxis Rotation axis. DZ if None.
8380                 theAngleStep Rotation angle in radians.
8381                 theNbTimes1 Quantity of rotations to be done.
8382                 theRadialStep Translation distance.
8383                 theNbTimes2 Quantity of translations to be done.
8384                 theName Object name; when specified, this parameter is used
8385                         for result publication in the study. Otherwise, if automatic
8386                         publication is switched on, default value is used for result name.
8387
8388             Returns:    
8389                 New GEOM.GEOM_Object, containing compound of all the
8390                 shapes, obtained after each transformation.
8391
8392             Example of usage:
8393                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8394             """
8395             # Example: see GEOM_TestAll.py
8396             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8397             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8398             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8399             anObj.SetParameters(Parameters)
8400             self._autoPublish(anObj, theName, "multirotation")
8401             return anObj
8402
8403         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8404         #
8405         #  @ref swig_MakeMultiRotation "Example"
8406         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8407             """
8408             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8409
8410             Example of usage:
8411                 pz = geompy.MakeVertex(0, 0, 100)
8412                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8413                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8414             """
8415             # Example: see GEOM_TestOthers.py
8416             aVec = self.MakeLine(aPoint,aDir)
8417             # note: auto-publishing is done in self.MultiRotate1D()
8418             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8419             return anObj
8420
8421         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8422         #
8423         #  @ref swig_MakeMultiRotation "Example"
8424         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8425             """
8426             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8427
8428             Example of usage:
8429                 pz = geompy.MakeVertex(0, 0, 100)
8430                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8431                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8432             """
8433             # Example: see GEOM_TestOthers.py
8434             aVec = self.MakeLine(aPoint,aDir)
8435             # note: auto-publishing is done in self.MultiRotate1D()
8436             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8437             return anObj
8438
8439         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8440         #
8441         #  @ref swig_MakeMultiRotation "Example"
8442         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8443             """
8444             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8445             
8446             Example of usage:
8447                 pz = geompy.MakeVertex(0, 0, 100)
8448                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8449                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8450             """
8451             # Example: see GEOM_TestOthers.py
8452             aVec = self.MakeLine(aPoint,aDir)
8453             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8454             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8455             return anObj
8456
8457         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8458         #
8459         #  @ref swig_MakeMultiRotation "Example"
8460         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8461             """
8462             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8463             
8464             Example of usage:
8465                 pz = geompy.MakeVertex(0, 0, 100)
8466                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8467                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8468             """
8469             # Example: see GEOM_TestOthers.py
8470             aVec = self.MakeLine(aPoint,aDir)
8471             # note: auto-publishing is done in self.MultiRotate2D()
8472             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8473             return anObj
8474
8475         # end of l3_transform
8476         ## @}
8477
8478         ## @addtogroup l3_transform_d
8479         ## @{
8480
8481         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8482         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8483             """
8484             Deprecated method. Use MultiRotate1DNbTimes instead.
8485             """
8486             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8487             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8488
8489         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8490         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8491         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8492             """
8493             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8494             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8495
8496             Example of usage:
8497                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8498             """
8499             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8500             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8501             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8502             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8503             anObj.SetParameters(Parameters)
8504             self._autoPublish(anObj, theName, "multirotation")
8505             return anObj
8506
8507         ## The same, as MultiRotate1D(), but axis is given by direction and point
8508         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8509         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8510             """
8511             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8512             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8513
8514             Example of usage:
8515                 pz = geompy.MakeVertex(0, 0, 100)
8516                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8517                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8518             """
8519             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8520             aVec = self.MakeLine(aPoint,aDir)
8521             # note: auto-publishing is done in self.MultiRotate1D()
8522             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8523             return anObj
8524
8525         ## The same, as MultiRotate2D(), but axis is given by direction and point
8526         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8527         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8528             """
8529             The same, as MultiRotate2D(), but axis is given by direction and point
8530             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8531             
8532             Example of usage:
8533                 pz = geompy.MakeVertex(0, 0, 100)
8534                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8535                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8536             """
8537             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8538             aVec = self.MakeLine(aPoint,aDir)
8539             # note: auto-publishing is done in self.MultiRotate2D()
8540             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8541             return anObj
8542
8543         # end of l3_transform_d
8544         ## @}
8545
8546         ## @addtogroup l3_local
8547         ## @{
8548
8549         ## Perform a fillet on all edges of the given shape.
8550         #  @param theShape Shape, to perform fillet on.
8551         #  @param theR Fillet radius.
8552         #  @param theName Object name; when specified, this parameter is used
8553         #         for result publication in the study. Otherwise, if automatic
8554         #         publication is switched on, default value is used for result name.
8555         #
8556         #  @return New GEOM.GEOM_Object, containing the result shape.
8557         #
8558         #  @ref tui_fillet "Example 1"
8559         #  \n @ref swig_MakeFilletAll "Example 2"
8560         def MakeFilletAll(self, theShape, theR, theName=None):
8561             """
8562             Perform a fillet on all edges of the given shape.
8563
8564             Parameters:
8565                 theShape Shape, to perform fillet on.
8566                 theR Fillet radius.
8567                 theName Object name; when specified, this parameter is used
8568                         for result publication in the study. Otherwise, if automatic
8569                         publication is switched on, default value is used for result name.
8570
8571             Returns: 
8572                 New GEOM.GEOM_Object, containing the result shape.
8573
8574             Example of usage: 
8575                filletall = geompy.MakeFilletAll(prism, 10.)
8576             """
8577             # Example: see GEOM_TestOthers.py
8578             theR,Parameters = ParseParameters(theR)
8579             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8580             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8581             anObj.SetParameters(Parameters)
8582             self._autoPublish(anObj, theName, "fillet")
8583             return anObj
8584
8585         ## Perform a fillet on the specified edges/faces of the given shape
8586         #  @param theShape Shape, to perform fillet on.
8587         #  @param theR Fillet radius.
8588         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8589         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8590         #  @param theName Object name; when specified, this parameter is used
8591         #         for result publication in the study. Otherwise, if automatic
8592         #         publication is switched on, default value is used for result name.
8593         #
8594         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8595         #
8596         #  @return New GEOM.GEOM_Object, containing the result shape.
8597         #
8598         #  @ref tui_fillet "Example"
8599         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8600             """
8601             Perform a fillet on the specified edges/faces of the given shape
8602
8603             Parameters:
8604                 theShape Shape, to perform fillet on.
8605                 theR Fillet radius.
8606                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8607                 theListShapes Global indices of edges/faces to perform fillet on.
8608                 theName Object name; when specified, this parameter is used
8609                         for result publication in the study. Otherwise, if automatic
8610                         publication is switched on, default value is used for result name.
8611
8612             Note:
8613                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8614
8615             Returns: 
8616                 New GEOM.GEOM_Object, containing the result shape.
8617
8618             Example of usage:
8619                 # get the list of IDs (IDList) for the fillet
8620                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8621                 IDlist_e = []
8622                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8623                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8624                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8625                 # make a fillet on the specified edges of the given shape
8626                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8627             """
8628             # Example: see GEOM_TestAll.py
8629             theR,Parameters = ParseParameters(theR)
8630             anObj = None
8631             if theShapeType == self.ShapeType["EDGE"]:
8632                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8633                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8634             else:
8635                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8636                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8637             anObj.SetParameters(Parameters)
8638             self._autoPublish(anObj, theName, "fillet")
8639             return anObj
8640
8641         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8642         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8643             """
8644             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8645
8646             Example of usage:
8647                 # get the list of IDs (IDList) for the fillet
8648                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8649                 IDlist_e = []
8650                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8651                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8652                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8653                 # make a fillet on the specified edges of the given shape
8654                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8655             """
8656             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8657             anObj = None
8658             if theShapeType == self.ShapeType["EDGE"]:
8659                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8660                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8661             else:
8662                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8663                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8664             anObj.SetParameters(Parameters)
8665             self._autoPublish(anObj, theName, "fillet")
8666             return anObj
8667
8668         ## Perform a fillet on the specified edges of the given shape
8669         #  @param theShape  Wire Shape to perform fillet on.
8670         #  @param theR  Fillet radius.
8671         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8672         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8673         #    \note The list of vertices could be empty,
8674         #          in this case fillet will done done at all vertices in wire
8675         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8676         #         by the length of the edges, nearest to the fillet vertex.
8677         #         But sometimes the next edge is C1 continuous with the one, nearest to
8678         #         the fillet point, and such two (or more) edges can be united to allow
8679         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8680         #         thus ignoring the secant vertex (vertices).
8681         #  @param theName Object name; when specified, this parameter is used
8682         #         for result publication in the study. Otherwise, if automatic
8683         #         publication is switched on, default value is used for result name.
8684         #
8685         #  @return New GEOM.GEOM_Object, containing the result shape.
8686         #
8687         #  @ref tui_fillet2d "Example"
8688         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8689             """
8690             Perform a fillet on the specified edges of the given shape
8691
8692             Parameters:
8693                 theShape  Wire Shape to perform fillet on.
8694                 theR  Fillet radius.
8695                 theListOfVertexes Global indices of vertexes to perform fillet on.
8696                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8697                     by the length of the edges, nearest to the fillet vertex.
8698                     But sometimes the next edge is C1 continuous with the one, nearest to
8699                     the fillet point, and such two (or more) edges can be united to allow
8700                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8701                     thus ignoring the secant vertex (vertices).
8702                 theName Object name; when specified, this parameter is used
8703                         for result publication in the study. Otherwise, if automatic
8704                         publication is switched on, default value is used for result name.
8705             Note:
8706                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8707
8708                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8709
8710             Returns: 
8711                 New GEOM.GEOM_Object, containing the result shape.
8712
8713             Example of usage:  
8714                 # create wire
8715                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8716                 # make fillet at given wire vertices with giver radius
8717                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8718             """
8719             # Example: see GEOM_TestAll.py
8720             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8721             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8722             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8723             anObj.SetParameters(Parameters)
8724             self._autoPublish(anObj, theName, "fillet")
8725             return anObj
8726
8727         ## Perform a fillet at the specified vertices of the given face/shell.
8728         #  @param theShape Face or Shell shape to perform fillet on.
8729         #  @param theR Fillet radius.
8730         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8731         #  @param theName Object name; when specified, this parameter is used
8732         #         for result publication in the study. Otherwise, if automatic
8733         #         publication is switched on, default value is used for result name.
8734         #
8735         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8736         #
8737         #  @return New GEOM.GEOM_Object, containing the result shape.
8738         #
8739         #  @ref tui_fillet2d "Example"
8740         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8741             """
8742             Perform a fillet at the specified vertices of the given face/shell.
8743
8744             Parameters:
8745                 theShape  Face or Shell shape to perform fillet on.
8746                 theR  Fillet radius.
8747                 theListOfVertexes Global indices of vertexes to perform fillet on.
8748                 theName Object name; when specified, this parameter is used
8749                         for result publication in the study. Otherwise, if automatic
8750                         publication is switched on, default value is used for result name.
8751             Note:
8752                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8753
8754             Returns: 
8755                 New GEOM.GEOM_Object, containing the result shape.
8756
8757             Example of usage:
8758                 face = geompy.MakeFaceHW(100, 100, 1)
8759                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8760             """
8761             # Example: see GEOM_TestAll.py
8762             theR,Parameters = ParseParameters(theR)
8763             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8764             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8765             anObj.SetParameters(Parameters)
8766             self._autoPublish(anObj, theName, "fillet")
8767             return anObj
8768
8769         ## Perform a symmetric chamfer on all edges of the given shape.
8770         #  @param theShape Shape, to perform chamfer on.
8771         #  @param theD Chamfer size along each face.
8772         #  @param theName Object name; when specified, this parameter is used
8773         #         for result publication in the study. Otherwise, if automatic
8774         #         publication is switched on, default value is used for result name.
8775         #
8776         #  @return New GEOM.GEOM_Object, containing the result shape.
8777         #
8778         #  @ref tui_chamfer "Example 1"
8779         #  \n @ref swig_MakeChamferAll "Example 2"
8780         def MakeChamferAll(self, theShape, theD, theName=None):
8781             """
8782             Perform a symmetric chamfer on all edges of the given shape.
8783
8784             Parameters:
8785                 theShape Shape, to perform chamfer on.
8786                 theD Chamfer size along each face.
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             Returns:     
8792                 New GEOM.GEOM_Object, containing the result shape.
8793
8794             Example of usage:
8795                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8796             """
8797             # Example: see GEOM_TestOthers.py
8798             theD,Parameters = ParseParameters(theD)
8799             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8800             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8801             anObj.SetParameters(Parameters)
8802             self._autoPublish(anObj, theName, "chamfer")
8803             return anObj
8804
8805         ## Perform a chamfer on edges, common to the specified faces,
8806         #  with distance D1 on the Face1
8807         #  @param theShape Shape, to perform chamfer on.
8808         #  @param theD1 Chamfer size along \a theFace1.
8809         #  @param theD2 Chamfer size along \a theFace2.
8810         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8811         #  @param theName Object name; when specified, this parameter is used
8812         #         for result publication in the study. Otherwise, if automatic
8813         #         publication is switched on, default value is used for result name.
8814         #
8815         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8816         #
8817         #  @return New GEOM.GEOM_Object, containing the result shape.
8818         #
8819         #  @ref tui_chamfer "Example"
8820         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8821             """
8822             Perform a chamfer on edges, common to the specified faces,
8823             with distance D1 on the Face1
8824
8825             Parameters:
8826                 theShape Shape, to perform chamfer on.
8827                 theD1 Chamfer size along theFace1.
8828                 theD2 Chamfer size along theFace2.
8829                 theFace1,theFace2 Global indices of two faces of theShape.
8830                 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             Note:
8835                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8836
8837             Returns:      
8838                 New GEOM.GEOM_Object, containing the result shape.
8839
8840             Example of usage:
8841                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8842                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8843                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8844                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8845             """
8846             # Example: see GEOM_TestAll.py
8847             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8848             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8849             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8850             anObj.SetParameters(Parameters)
8851             self._autoPublish(anObj, theName, "chamfer")
8852             return anObj
8853
8854         ## Perform a chamfer on edges
8855         #  @param theShape Shape, to perform chamfer on.
8856         #  @param theD Chamfer length
8857         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8858         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8859         #  @param theName Object name; when specified, this parameter is used
8860         #         for result publication in the study. Otherwise, if automatic
8861         #         publication is switched on, default value is used for result name.
8862         #
8863         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8864         #
8865         #  @return New GEOM.GEOM_Object, containing the result shape.
8866         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8867             """
8868             Perform a chamfer on edges
8869
8870             Parameters:
8871                 theShape Shape, to perform chamfer on.
8872                 theD1 Chamfer size along theFace1.
8873                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8874                 theFace1,theFace2 Global indices of two faces of theShape.
8875                 theName Object name; when specified, this parameter is used
8876                         for result publication in the study. Otherwise, if automatic
8877                         publication is switched on, default value is used for result name.
8878
8879             Note:
8880                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8881
8882             Returns:      
8883                 New GEOM.GEOM_Object, containing the result shape.
8884
8885             Example of usage:
8886                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8887                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8888                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8889                 ang = 30
8890                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8891             """
8892             flag = False
8893             if isinstance(theAngle,str):
8894                 flag = True
8895             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8896             if flag:
8897                 theAngle = theAngle*math.pi/180.0
8898             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8899             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8900             anObj.SetParameters(Parameters)
8901             self._autoPublish(anObj, theName, "chamfer")
8902             return anObj
8903
8904         ## Perform a chamfer on all edges of the specified faces,
8905         #  with distance D1 on the first specified face (if several for one edge)
8906         #  @param theShape Shape, to perform chamfer on.
8907         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8908         #               connected to the edge, are in \a theFaces, \a theD1
8909         #               will be get along face, which is nearer to \a theFaces beginning.
8910         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8911         #  @param theFaces Sequence of global indices of faces of \a theShape.
8912         #  @param theName Object name; when specified, this parameter is used
8913         #         for result publication in the study. Otherwise, if automatic
8914         #         publication is switched on, default value is used for result name.
8915         #
8916         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8917         #
8918         #  @return New GEOM.GEOM_Object, containing the result shape.
8919         #
8920         #  @ref tui_chamfer "Example"
8921         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8922             """
8923             Perform a chamfer on all edges of the specified faces,
8924             with distance D1 on the first specified face (if several for one edge)
8925
8926             Parameters:
8927                 theShape Shape, to perform chamfer on.
8928                 theD1 Chamfer size along face from  theFaces. If both faces,
8929                       connected to the edge, are in theFaces, theD1
8930                       will be get along face, which is nearer to theFaces beginning.
8931                 theD2 Chamfer size along another of two faces, connected to the edge.
8932                 theFaces Sequence of global indices of faces of theShape.
8933                 theName Object name; when specified, this parameter is used
8934                         for result publication in the study. Otherwise, if automatic
8935                         publication is switched on, default value is used for result name.
8936                 
8937             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8938
8939             Returns:  
8940                 New GEOM.GEOM_Object, containing the result shape.
8941             """
8942             # Example: see GEOM_TestAll.py
8943             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8944             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8945             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8946             anObj.SetParameters(Parameters)
8947             self._autoPublish(anObj, theName, "chamfer")
8948             return anObj
8949
8950         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8951         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8952         #
8953         #  @ref swig_FilletChamfer "Example"
8954         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8955             """
8956             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8957             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8958             """
8959             flag = False
8960             if isinstance(theAngle,str):
8961                 flag = True
8962             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8963             if flag:
8964                 theAngle = theAngle*math.pi/180.0
8965             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8966             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8967             anObj.SetParameters(Parameters)
8968             self._autoPublish(anObj, theName, "chamfer")
8969             return anObj
8970
8971         ## Perform a chamfer on edges,
8972         #  with distance D1 on the first specified face (if several for one edge)
8973         #  @param theShape Shape, to perform chamfer on.
8974         #  @param theD1,theD2 Chamfer size
8975         #  @param theEdges Sequence of edges of \a theShape.
8976         #  @param theName Object name; when specified, this parameter is used
8977         #         for result publication in the study. Otherwise, if automatic
8978         #         publication is switched on, default value is used for result name.
8979         #
8980         #  @return New GEOM.GEOM_Object, containing the result shape.
8981         #
8982         #  @ref swig_FilletChamfer "Example"
8983         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8984             """
8985             Perform a chamfer on edges,
8986             with distance D1 on the first specified face (if several for one edge)
8987             
8988             Parameters:
8989                 theShape Shape, to perform chamfer on.
8990                 theD1,theD2 Chamfer size
8991                 theEdges Sequence of edges of theShape.
8992                 theName Object name; when specified, this parameter is used
8993                         for result publication in the study. Otherwise, if automatic
8994                         publication is switched on, default value is used for result name.
8995
8996             Returns:
8997                 New GEOM.GEOM_Object, containing the result shape.
8998             """
8999             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9000             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9001             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9002             anObj.SetParameters(Parameters)
9003             self._autoPublish(anObj, theName, "chamfer")
9004             return anObj
9005
9006         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9007         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9008         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9009             """
9010             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9011             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9012             """
9013             flag = False
9014             if isinstance(theAngle,str):
9015                 flag = True
9016             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9017             if flag:
9018                 theAngle = theAngle*math.pi/180.0
9019             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9020             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9021             anObj.SetParameters(Parameters)
9022             self._autoPublish(anObj, theName, "chamfer")
9023             return anObj
9024
9025         ## @sa MakeChamferEdge(), MakeChamferFaces()
9026         #
9027         #  @ref swig_MakeChamfer "Example"
9028         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9029             """
9030             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9031             """
9032             # Example: see GEOM_TestOthers.py
9033             anObj = None
9034             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9035             if aShapeType == self.ShapeType["EDGE"]:
9036                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9037             else:
9038                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9039             return anObj
9040             
9041         ## Remove material from a solid by extrusion of the base shape on the given distance.
9042         #  @param theInit Shape to remove material from. It must be a solid or 
9043         #  a compound made of a single solid.
9044         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9045         #  @param theH Prism dimension along the normal to theBase
9046         #  @param theAngle Draft angle in degrees.
9047         #  @param theName Object name; when specified, this parameter is used
9048         #         for result publication in the study. Otherwise, if automatic
9049         #         publication is switched on, default value is used for result name.
9050         #
9051         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
9052         #
9053         #  @ref tui_creation_prism "Example"
9054         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9055             """
9056             Add material to a solid by extrusion of the base shape on the given distance.
9057
9058             Parameters:
9059                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9060                 theBase Closed edge or wire defining the base shape to be extruded.
9061                 theH Prism dimension along the normal  to theBase
9062                 theAngle Draft angle in degrees.
9063                 theName Object name; when specified, this parameter is used
9064                         for result publication in the study. Otherwise, if automatic
9065                         publication is switched on, default value is used for result name.
9066
9067             Returns:
9068                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9069             """
9070             # Example: see GEOM_TestAll.py
9071             #theH,Parameters = ParseParameters(theH)
9072             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9073             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9074             #anObj.SetParameters(Parameters)
9075             self._autoPublish(anObj, theName, "extrudedCut")
9076             return anObj   
9077             
9078         ## Add material to a solid by extrusion of the base shape on the given distance.
9079         #  @param theInit Shape to add material to. It must be a solid or 
9080         #  a compound made of a single solid.
9081         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9082         #  @param theH Prism dimension along the normal to theBase
9083         #  @param theAngle Draft angle in degrees.
9084         #  @param theName Object name; when specified, this parameter is used
9085         #         for result publication in the study. Otherwise, if automatic
9086         #         publication is switched on, default value is used for result name.
9087         #
9088         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
9089         #
9090         #  @ref tui_creation_prism "Example"
9091         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9092             """
9093             Add material to a solid by extrusion of the base shape on the given distance.
9094
9095             Parameters:
9096                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9097                 theBase Closed edge or wire defining the base shape to be extruded.
9098                 theH Prism dimension along the normal  to theBase
9099                 theAngle Draft angle in degrees.
9100                 theName Object name; when specified, this parameter is used
9101                         for result publication in the study. Otherwise, if automatic
9102                         publication is switched on, default value is used for result name.
9103
9104             Returns:
9105                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9106             """
9107             # Example: see GEOM_TestAll.py
9108             #theH,Parameters = ParseParameters(theH)
9109             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9110             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9111             #anObj.SetParameters(Parameters)
9112             self._autoPublish(anObj, theName, "extrudedBoss")
9113             return anObj   
9114
9115         # end of l3_local
9116         ## @}
9117
9118         ## @addtogroup l3_basic_op
9119         ## @{
9120
9121         ## Perform an Archimde operation on the given shape with given parameters.
9122         #  The object presenting the resulting face is returned.
9123         #  @param theShape Shape to be put in water.
9124         #  @param theWeight Weight og the shape.
9125         #  @param theWaterDensity Density of the water.
9126         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9127         #  @param theName Object name; when specified, this parameter is used
9128         #         for result publication in the study. Otherwise, if automatic
9129         #         publication is switched on, default value is used for result name.
9130         #
9131         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9132         #          by a plane, corresponding to water level.
9133         #
9134         #  @ref tui_archimede "Example"
9135         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9136             """
9137             Perform an Archimde operation on the given shape with given parameters.
9138             The object presenting the resulting face is returned.
9139
9140             Parameters: 
9141                 theShape Shape to be put in water.
9142                 theWeight Weight og the shape.
9143                 theWaterDensity Density of the water.
9144                 theMeshDeflection Deflection of the mesh, using to compute the section.
9145                 theName Object name; when specified, this parameter is used
9146                         for result publication in the study. Otherwise, if automatic
9147                         publication is switched on, default value is used for result name.
9148
9149             Returns: 
9150                 New GEOM.GEOM_Object, containing a section of theShape
9151                 by a plane, corresponding to water level.
9152             """
9153             # Example: see GEOM_TestAll.py
9154             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9155               theWeight,theWaterDensity,theMeshDeflection)
9156             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9157             RaiseIfFailed("MakeArchimede", self.LocalOp)
9158             anObj.SetParameters(Parameters)
9159             self._autoPublish(anObj, theName, "archimede")
9160             return anObj
9161
9162         # end of l3_basic_op
9163         ## @}
9164
9165         ## @addtogroup l2_measure
9166         ## @{
9167
9168         ## Get point coordinates
9169         #  @return [x, y, z]
9170         #
9171         #  @ref tui_measurement_tools_page "Example"
9172         def PointCoordinates(self,Point):
9173             """
9174             Get point coordinates
9175
9176             Returns:
9177                 [x, y, z]
9178             """
9179             # Example: see GEOM_TestMeasures.py
9180             aTuple = self.MeasuOp.PointCoordinates(Point)
9181             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9182             return aTuple 
9183         
9184         ## Get vector coordinates
9185         #  @return [x, y, z]
9186         #
9187         #  @ref tui_measurement_tools_page "Example"
9188         def VectorCoordinates(self,Vector):
9189             """
9190             Get vector coordinates
9191
9192             Returns:
9193                 [x, y, z]
9194             """
9195
9196             p1=self.GetFirstVertex(Vector)
9197             p2=self.GetLastVertex(Vector)
9198             
9199             X1=self.PointCoordinates(p1)
9200             X2=self.PointCoordinates(p2)
9201
9202             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9203
9204
9205         ## Compute cross product
9206         #  @return vector w=u^v
9207         #
9208         #  @ref tui_measurement_tools_page "Example"
9209         def CrossProduct(self, Vector1, Vector2):
9210             """ 
9211             Compute cross product
9212             
9213             Returns: vector w=u^v
9214             """
9215             u=self.VectorCoordinates(Vector1)
9216             v=self.VectorCoordinates(Vector2)
9217             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])
9218             
9219             return w
9220         
9221         ## Compute cross product
9222         #  @return dot product  p=u.v
9223         #
9224         #  @ref tui_measurement_tools_page "Example"
9225         def DotProduct(self, Vector1, Vector2):
9226             """ 
9227             Compute cross product
9228             
9229             Returns: dot product  p=u.v
9230             """
9231             u=self.VectorCoordinates(Vector1)
9232             v=self.VectorCoordinates(Vector2)
9233             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9234             
9235             return p
9236
9237
9238         ## Get summarized length of all wires,
9239         #  area of surface and volume of the given shape.
9240         #  @param theShape Shape to define properties of.
9241         #  @return [theLength, theSurfArea, theVolume]\n
9242         #  theLength:   Summarized length of all wires of the given shape.\n
9243         #  theSurfArea: Area of surface of the given shape.\n
9244         #  theVolume:   Volume of the given shape.
9245         #
9246         #  @ref tui_measurement_tools_page "Example"
9247         def BasicProperties(self,theShape):
9248             """
9249             Get summarized length of all wires,
9250             area of surface and volume of the given shape.
9251
9252             Parameters: 
9253                 theShape Shape to define properties of.
9254
9255             Returns:
9256                 [theLength, theSurfArea, theVolume]
9257                  theLength:   Summarized length of all wires of the given shape.
9258                  theSurfArea: Area of surface of the given shape.
9259                  theVolume:   Volume of the given shape.
9260             """
9261             # Example: see GEOM_TestMeasures.py
9262             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9263             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9264             return aTuple
9265
9266         ## Get parameters of bounding box of the given shape
9267         #  @param theShape Shape to obtain bounding box of.
9268         #  @param precise TRUE for precise computation; FALSE for fast one.
9269         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9270         #  Xmin,Xmax: Limits of shape along OX axis.
9271         #  Ymin,Ymax: Limits of shape along OY axis.
9272         #  Zmin,Zmax: Limits of shape along OZ axis.
9273         #
9274         #  @ref tui_measurement_tools_page "Example"
9275         def BoundingBox (self, theShape, precise=False):
9276             """
9277             Get parameters of bounding box of the given shape
9278
9279             Parameters: 
9280                 theShape Shape to obtain bounding box of.
9281                 precise TRUE for precise computation; FALSE for fast one.
9282
9283             Returns:
9284                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9285                  Xmin,Xmax: Limits of shape along OX axis.
9286                  Ymin,Ymax: Limits of shape along OY axis.
9287                  Zmin,Zmax: Limits of shape along OZ axis.
9288             """
9289             # Example: see GEOM_TestMeasures.py
9290             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9291             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9292             return aTuple
9293
9294         ## Get bounding box of the given shape
9295         #  @param theShape Shape to obtain bounding box of.
9296         #  @param precise TRUE for precise computation; FALSE for fast one.
9297         #  @param theName Object name; when specified, this parameter is used
9298         #         for result publication in the study. Otherwise, if automatic
9299         #         publication is switched on, default value is used for result name.
9300         #
9301         #  @return New GEOM.GEOM_Object, containing the created box.
9302         #
9303         #  @ref tui_measurement_tools_page "Example"
9304         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9305             """
9306             Get bounding box of the given shape
9307
9308             Parameters: 
9309                 theShape Shape to obtain bounding box of.
9310                 precise TRUE for precise computation; FALSE for fast one.
9311                 theName Object name; when specified, this parameter is used
9312                         for result publication in the study. Otherwise, if automatic
9313                         publication is switched on, default value is used for result name.
9314
9315             Returns:
9316                 New GEOM.GEOM_Object, containing the created box.
9317             """
9318             # Example: see GEOM_TestMeasures.py
9319             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9320             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9321             self._autoPublish(anObj, theName, "bndbox")
9322             return anObj
9323
9324         ## Get inertia matrix and moments of inertia of theShape.
9325         #  @param theShape Shape to calculate inertia of.
9326         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9327         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9328         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9329         #
9330         #  @ref tui_measurement_tools_page "Example"
9331         def Inertia(self,theShape):
9332             """
9333             Get inertia matrix and moments of inertia of theShape.
9334
9335             Parameters: 
9336                 theShape Shape to calculate inertia of.
9337
9338             Returns:
9339                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9340                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9341                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9342             """
9343             # Example: see GEOM_TestMeasures.py
9344             aTuple = self.MeasuOp.GetInertia(theShape)
9345             RaiseIfFailed("GetInertia", self.MeasuOp)
9346             return aTuple
9347
9348         ## Get if coords are included in the shape (ST_IN or ST_ON)
9349         #  @param theShape Shape
9350         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9351         #  @param tolerance to be used (default is 1.0e-7)
9352         #  @return list_of_boolean = [res1, res2, ...]
9353         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9354             """
9355             Get if coords are included in the shape (ST_IN or ST_ON)
9356             
9357             Parameters: 
9358                 theShape Shape
9359                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9360                 tolerance to be used (default is 1.0e-7)
9361
9362             Returns:
9363                 list_of_boolean = [res1, res2, ...]
9364             """
9365             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9366
9367         ## Get minimal distance between the given shapes.
9368         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9369         #  @return Value of the minimal distance between the given shapes.
9370         #
9371         #  @ref tui_measurement_tools_page "Example"
9372         def MinDistance(self, theShape1, theShape2):
9373             """
9374             Get minimal distance between the given shapes.
9375             
9376             Parameters: 
9377                 theShape1,theShape2 Shapes to find minimal distance between.
9378
9379             Returns:    
9380                 Value of the minimal distance between the given shapes.
9381             """
9382             # Example: see GEOM_TestMeasures.py
9383             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9384             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9385             return aTuple[0]
9386
9387         ## Get minimal distance between the given shapes.
9388         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9389         #  @return Value of the minimal distance between the given shapes, in form of list
9390         #          [Distance, DX, DY, DZ].
9391         #
9392         #  @ref swig_all_measure "Example"
9393         def MinDistanceComponents(self, theShape1, theShape2):
9394             """
9395             Get minimal distance between the given shapes.
9396
9397             Parameters: 
9398                 theShape1,theShape2 Shapes to find minimal distance between.
9399
9400             Returns:  
9401                 Value of the minimal distance between the given shapes, in form of list
9402                 [Distance, DX, DY, DZ]
9403             """
9404             # Example: see GEOM_TestMeasures.py
9405             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9406             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9407             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9408             return aRes
9409
9410         ## Get closest points of the given shapes.
9411         #  @param theShape1,theShape2 Shapes to find closest points of.
9412         #  @return The number of found solutions (-1 in case of infinite number of
9413         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9414         #
9415         #  @ref tui_measurement_tools_page "Example"
9416         def ClosestPoints (self, theShape1, theShape2):
9417             """
9418             Get closest points of the given shapes.
9419
9420             Parameters: 
9421                 theShape1,theShape2 Shapes to find closest points of.
9422
9423             Returns:    
9424                 The number of found solutions (-1 in case of infinite number of
9425                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9426             """
9427             # Example: see GEOM_TestMeasures.py
9428             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9429             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9430             return aTuple
9431
9432         ## Get angle between the given shapes in degrees.
9433         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9434         #  @note If both arguments are vectors, the angle is computed in accordance
9435         #        with their orientations, otherwise the minimum angle is computed.
9436         #  @return Value of the angle between the given shapes in degrees.
9437         #
9438         #  @ref tui_measurement_tools_page "Example"
9439         def GetAngle(self, theShape1, theShape2):
9440             """
9441             Get angle between the given shapes in degrees.
9442
9443             Parameters: 
9444                 theShape1,theShape2 Lines or linear edges to find angle between.
9445
9446             Note:
9447                 If both arguments are vectors, the angle is computed in accordance
9448                 with their orientations, otherwise the minimum angle is computed.
9449
9450             Returns:  
9451                 Value of the angle between the given shapes in degrees.
9452             """
9453             # Example: see GEOM_TestMeasures.py
9454             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9455             RaiseIfFailed("GetAngle", self.MeasuOp)
9456             return anAngle
9457
9458         ## Get angle between the given shapes in radians.
9459         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9460         #  @note If both arguments are vectors, the angle is computed in accordance
9461         #        with their orientations, otherwise the minimum angle is computed.
9462         #  @return Value of the angle between the given shapes in radians.
9463         #
9464         #  @ref tui_measurement_tools_page "Example"
9465         def GetAngleRadians(self, theShape1, theShape2):
9466             """
9467             Get angle between the given shapes in radians.
9468
9469             Parameters: 
9470                 theShape1,theShape2 Lines or linear edges to find angle between.
9471
9472                 
9473             Note:
9474                 If both arguments are vectors, the angle is computed in accordance
9475                 with their orientations, otherwise the minimum angle is computed.
9476
9477             Returns:  
9478                 Value of the angle between the given shapes in radians.
9479             """
9480             # Example: see GEOM_TestMeasures.py
9481             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9482             RaiseIfFailed("GetAngle", self.MeasuOp)
9483             return anAngle
9484
9485         ## Get angle between the given vectors in degrees.
9486         #  @param theShape1,theShape2 Vectors to find angle between.
9487         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9488         #                 if False, the opposite vector to the normal vector is used.
9489         #  @return Value of the angle between the given vectors in degrees.
9490         #
9491         #  @ref tui_measurement_tools_page "Example"
9492         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9493             """
9494             Get angle between the given vectors in degrees.
9495
9496             Parameters: 
9497                 theShape1,theShape2 Vectors to find angle between.
9498                 theFlag If True, the normal vector is defined by the two vectors cross,
9499                         if False, the opposite vector to the normal vector is used.
9500
9501             Returns:  
9502                 Value of the angle between the given vectors in degrees.
9503             """
9504             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9505             if not theFlag:
9506                 anAngle = 360. - anAngle
9507             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9508             return anAngle
9509
9510         ## The same as GetAngleVectors, but the result is in radians.
9511         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9512             """
9513             Get angle between the given vectors in radians.
9514
9515             Parameters: 
9516                 theShape1,theShape2 Vectors to find angle between.
9517                 theFlag If True, the normal vector is defined by the two vectors cross,
9518                         if False, the opposite vector to the normal vector is used.
9519
9520             Returns:  
9521                 Value of the angle between the given vectors in radians.
9522             """
9523             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9524             return anAngle
9525
9526         ## @name Curve Curvature Measurement
9527         #  Methods for receiving radius of curvature of curves
9528         #  in the given point
9529         ## @{
9530
9531         ## Measure curvature of a curve at a point, set by parameter.
9532         #  @param theCurve a curve.
9533         #  @param theParam parameter.
9534         #  @return radius of curvature of \a theCurve.
9535         #
9536         #  @ref swig_todo "Example"
9537         def CurveCurvatureByParam(self, theCurve, theParam):
9538             """
9539             Measure curvature of a curve at a point, set by parameter.
9540
9541             Parameters: 
9542                 theCurve a curve.
9543                 theParam parameter.
9544
9545             Returns: 
9546                 radius of curvature of theCurve.
9547             """
9548             # Example: see GEOM_TestMeasures.py
9549             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9550             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9551             return aCurv
9552
9553         ## Measure curvature of a curve at a point.
9554         #  @param theCurve a curve.
9555         #  @param thePoint given point.
9556         #  @return radius of curvature of \a theCurve.
9557         #
9558         #  @ref swig_todo "Example"
9559         def CurveCurvatureByPoint(self, theCurve, thePoint):
9560             """
9561             Measure curvature of a curve at a point.
9562
9563             Parameters: 
9564                 theCurve a curve.
9565                 thePoint given point.
9566
9567             Returns: 
9568                 radius of curvature of theCurve.           
9569             """
9570             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9571             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9572             return aCurv
9573         ## @}
9574
9575         ## @name Surface Curvature Measurement
9576         #  Methods for receiving max and min radius of curvature of surfaces
9577         #  in the given point
9578         ## @{
9579
9580         ## Measure max radius of curvature of surface.
9581         #  @param theSurf the given surface.
9582         #  @param theUParam Value of U-parameter on the referenced surface.
9583         #  @param theVParam Value of V-parameter on the referenced surface.
9584         #  @return max radius of curvature of theSurf.
9585         #
9586         ## @ref swig_todo "Example"
9587         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9588             """
9589             Measure max radius of curvature of surface.
9590
9591             Parameters: 
9592                 theSurf the given surface.
9593                 theUParam Value of U-parameter on the referenced surface.
9594                 theVParam Value of V-parameter on the referenced surface.
9595                 
9596             Returns:     
9597                 max radius of curvature of theSurf.
9598             """
9599             # Example: see GEOM_TestMeasures.py
9600             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9601             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9602             return aSurf
9603
9604         ## Measure max radius of curvature of surface in the given point
9605         #  @param theSurf the given surface.
9606         #  @param thePoint given point.
9607         #  @return max radius of curvature of theSurf.
9608         #
9609         ## @ref swig_todo "Example"
9610         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9611             """
9612             Measure max radius of curvature of surface in the given point.
9613
9614             Parameters: 
9615                 theSurf the given surface.
9616                 thePoint given point.
9617                 
9618             Returns:     
9619                 max radius of curvature of theSurf.          
9620             """
9621             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9622             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9623             return aSurf
9624
9625         ## Measure min radius of curvature of surface.
9626         #  @param theSurf the given surface.
9627         #  @param theUParam Value of U-parameter on the referenced surface.
9628         #  @param theVParam Value of V-parameter on the referenced surface.
9629         #  @return min radius of curvature of theSurf.
9630         #   
9631         ## @ref swig_todo "Example"
9632         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9633             """
9634             Measure min radius of curvature of surface.
9635
9636             Parameters: 
9637                 theSurf the given surface.
9638                 theUParam Value of U-parameter on the referenced surface.
9639                 theVParam Value of V-parameter on the referenced surface.
9640                 
9641             Returns:     
9642                 Min radius of curvature of theSurf.
9643             """
9644             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9645             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9646             return aSurf
9647
9648         ## Measure min radius of curvature of surface in the given point
9649         #  @param theSurf the given surface.
9650         #  @param thePoint given point.
9651         #  @return min radius of curvature of theSurf.
9652         #
9653         ## @ref swig_todo "Example"
9654         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9655             """
9656             Measure min radius of curvature of surface in the given point.
9657
9658             Parameters: 
9659                 theSurf the given surface.
9660                 thePoint given point.
9661                 
9662             Returns:     
9663                 Min radius of curvature of theSurf.          
9664             """
9665             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9666             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9667             return aSurf
9668         ## @}
9669
9670         ## Get min and max tolerances of sub-shapes of theShape
9671         #  @param theShape Shape, to get tolerances of.
9672         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9673         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9674         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9675         #  VertMin,VertMax: Min and max tolerances of the vertices.
9676         #
9677         #  @ref tui_measurement_tools_page "Example"
9678         def Tolerance(self,theShape):
9679             """
9680             Get min and max tolerances of sub-shapes of theShape
9681
9682             Parameters: 
9683                 theShape Shape, to get tolerances of.
9684
9685             Returns:    
9686                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9687                  FaceMin,FaceMax: Min and max tolerances of the faces.
9688                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9689                  VertMin,VertMax: Min and max tolerances of the vertices.
9690             """
9691             # Example: see GEOM_TestMeasures.py
9692             aTuple = self.MeasuOp.GetTolerance(theShape)
9693             RaiseIfFailed("GetTolerance", self.MeasuOp)
9694             return aTuple
9695
9696         ## Obtain description of the given shape (number of sub-shapes of each type)
9697         #  @param theShape Shape to be described.
9698         #  @return Description of the given shape.
9699         #
9700         #  @ref tui_measurement_tools_page "Example"
9701         def WhatIs(self,theShape):
9702             """
9703             Obtain description of the given shape (number of sub-shapes of each type)
9704
9705             Parameters:
9706                 theShape Shape to be described.
9707
9708             Returns:
9709                 Description of the given shape.
9710             """
9711             # Example: see GEOM_TestMeasures.py
9712             aDescr = self.MeasuOp.WhatIs(theShape)
9713             RaiseIfFailed("WhatIs", self.MeasuOp)
9714             return aDescr
9715
9716         ## Obtain quantity of shapes of the given type in \a theShape.
9717         #  If \a theShape is of type \a theType, it is also counted.
9718         #  @param theShape Shape to be described.
9719         #  @param theType the given ShapeType().
9720         #  @return Quantity of shapes of type \a theType in \a theShape.
9721         #
9722         #  @ref tui_measurement_tools_page "Example"
9723         def NbShapes (self, theShape, theType):
9724             """
9725             Obtain quantity of shapes of the given type in theShape.
9726             If theShape is of type theType, it is also counted.
9727
9728             Parameters:
9729                 theShape Shape to be described.
9730                 theType the given geompy.ShapeType
9731
9732             Returns:
9733                 Quantity of shapes of type theType in theShape.
9734             """
9735             # Example: see GEOM_TestMeasures.py
9736             listSh = self.SubShapeAllIDs(theShape, theType)
9737             Nb = len(listSh)
9738             return Nb
9739
9740         ## Obtain quantity of shapes of each type in \a theShape.
9741         #  The \a theShape is also counted.
9742         #  @param theShape Shape to be described.
9743         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9744         #
9745         #  @ref tui_measurement_tools_page "Example"
9746         def ShapeInfo (self, theShape):
9747             """
9748             Obtain quantity of shapes of each type in theShape.
9749             The theShape is also counted.
9750
9751             Parameters:
9752                 theShape Shape to be described.
9753
9754             Returns:
9755                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9756             """
9757             # Example: see GEOM_TestMeasures.py
9758             aDict = {}
9759             for typeSh in self.ShapeType:
9760                 if typeSh in ( "AUTO", "SHAPE" ): continue
9761                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9762                 Nb = len(listSh)
9763                 aDict[typeSh] = Nb
9764                 pass
9765             return aDict
9766
9767         def GetCreationInformation(self, theShape):
9768             info = theShape.GetCreationInformation()
9769             # operationName
9770             opName = info.operationName
9771             if not opName: opName = "no info available"
9772             res = "Operation: " + opName
9773             # parameters
9774             for parVal in info.params:
9775                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9776             return res
9777
9778         ## Get a point, situated at the centre of mass of theShape.
9779         #  @param theShape Shape to define centre of mass of.
9780         #  @param theName Object name; when specified, this parameter is used
9781         #         for result publication in the study. Otherwise, if automatic
9782         #         publication is switched on, default value is used for result name.
9783         #
9784         #  @return New GEOM.GEOM_Object, containing the created point.
9785         #
9786         #  @ref tui_measurement_tools_page "Example"
9787         def MakeCDG(self, theShape, theName=None):
9788             """
9789             Get a point, situated at the centre of mass of theShape.
9790
9791             Parameters:
9792                 theShape Shape to define centre of mass of.
9793                 theName Object name; when specified, this parameter is used
9794                         for result publication in the study. Otherwise, if automatic
9795                         publication is switched on, default value is used for result name.
9796
9797             Returns:
9798                 New GEOM.GEOM_Object, containing the created point.
9799             """
9800             # Example: see GEOM_TestMeasures.py
9801             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9802             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9803             self._autoPublish(anObj, theName, "centerOfMass")
9804             return anObj
9805
9806         ## Get a vertex sub-shape by index depended with orientation.
9807         #  @param theShape Shape to find sub-shape.
9808         #  @param theIndex Index to find vertex by this index (starting from zero)
9809         #  @param theName Object name; when specified, this parameter is used
9810         #         for result publication in the study. Otherwise, if automatic
9811         #         publication is switched on, default value is used for result name.
9812         #
9813         #  @return New GEOM.GEOM_Object, containing the created vertex.
9814         #
9815         #  @ref tui_measurement_tools_page "Example"
9816         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9817             """
9818             Get a vertex sub-shape by index depended with orientation.
9819
9820             Parameters:
9821                 theShape Shape to find sub-shape.
9822                 theIndex Index to find vertex by this index (starting from zero)
9823                 theName Object name; when specified, this parameter is used
9824                         for result publication in the study. Otherwise, if automatic
9825                         publication is switched on, default value is used for result name.
9826
9827             Returns:
9828                 New GEOM.GEOM_Object, containing the created vertex.
9829             """
9830             # Example: see GEOM_TestMeasures.py
9831             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9832             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9833             self._autoPublish(anObj, theName, "vertex")
9834             return anObj
9835
9836         ## Get the first vertex of wire/edge depended orientation.
9837         #  @param theShape Shape to find first vertex.
9838         #  @param theName Object name; when specified, this parameter is used
9839         #         for result publication in the study. Otherwise, if automatic
9840         #         publication is switched on, default value is used for result name.
9841         #
9842         #  @return New GEOM.GEOM_Object, containing the created vertex.
9843         #
9844         #  @ref tui_measurement_tools_page "Example"
9845         def GetFirstVertex(self, theShape, theName=None):
9846             """
9847             Get the first vertex of wire/edge depended orientation.
9848
9849             Parameters:
9850                 theShape Shape to find first vertex.
9851                 theName Object name; when specified, this parameter is used
9852                         for result publication in the study. Otherwise, if automatic
9853                         publication is switched on, default value is used for result name.
9854
9855             Returns:    
9856                 New GEOM.GEOM_Object, containing the created vertex.
9857             """
9858             # Example: see GEOM_TestMeasures.py
9859             # note: auto-publishing is done in self.GetVertexByIndex()
9860             anObj = self.GetVertexByIndex(theShape, 0, theName)
9861             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9862             return anObj
9863
9864         ## Get the last vertex of wire/edge depended orientation.
9865         #  @param theShape Shape to find last vertex.
9866         #  @param theName Object name; when specified, this parameter is used
9867         #         for result publication in the study. Otherwise, if automatic
9868         #         publication is switched on, default value is used for result name.
9869         #
9870         #  @return New GEOM.GEOM_Object, containing the created vertex.
9871         #
9872         #  @ref tui_measurement_tools_page "Example"
9873         def GetLastVertex(self, theShape, theName=None):
9874             """
9875             Get the last vertex of wire/edge depended orientation.
9876
9877             Parameters: 
9878                 theShape Shape to find last vertex.
9879                 theName Object name; when specified, this parameter is used
9880                         for result publication in the study. Otherwise, if automatic
9881                         publication is switched on, default value is used for result name.
9882
9883             Returns:   
9884                 New GEOM.GEOM_Object, containing the created vertex.
9885             """
9886             # Example: see GEOM_TestMeasures.py
9887             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9888             # note: auto-publishing is done in self.GetVertexByIndex()
9889             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9890             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9891             return anObj
9892
9893         ## Get a normale to the given face. If the point is not given,
9894         #  the normale is calculated at the center of mass.
9895         #  @param theFace Face to define normale of.
9896         #  @param theOptionalPoint Point to compute the normale at.
9897         #  @param theName Object name; when specified, this parameter is used
9898         #         for result publication in the study. Otherwise, if automatic
9899         #         publication is switched on, default value is used for result name.
9900         #
9901         #  @return New GEOM.GEOM_Object, containing the created vector.
9902         #
9903         #  @ref swig_todo "Example"
9904         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9905             """
9906             Get a normale to the given face. If the point is not given,
9907             the normale is calculated at the center of mass.
9908             
9909             Parameters: 
9910                 theFace Face to define normale of.
9911                 theOptionalPoint Point to compute the normale at.
9912                 theName Object name; when specified, this parameter is used
9913                         for result publication in the study. Otherwise, if automatic
9914                         publication is switched on, default value is used for result name.
9915
9916             Returns:   
9917                 New GEOM.GEOM_Object, containing the created vector.
9918             """
9919             # Example: see GEOM_TestMeasures.py
9920             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9921             RaiseIfFailed("GetNormal", self.MeasuOp)
9922             self._autoPublish(anObj, theName, "normal")
9923             return anObj
9924
9925         ## Check a topology of the given shape.
9926         #  @param theShape Shape to check validity of.
9927         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9928         #                        if TRUE, the shape's geometry will be checked also.
9929         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9930         #                        of problem is printed.
9931         #                        if TRUE and if theShape is invalid, the description 
9932         #                        of problem is also returned.
9933         #  @return TRUE, if the shape "seems to be valid".
9934         #
9935         #  @ref tui_measurement_tools_page "Example"
9936         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9937             """
9938             Check a topology of the given shape.
9939
9940             Parameters: 
9941                 theShape Shape to check validity of.
9942                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9943                                if TRUE, the shape's geometry will be checked also.
9944                 theReturnStatus If FALSE and if theShape is invalid, a description
9945                                 of problem is printed.
9946                                 if TRUE and if theShape is invalid, the description 
9947                                 of problem is returned.
9948
9949             Returns:   
9950                 TRUE, if the shape "seems to be valid".
9951                 If theShape is invalid, prints a description of problem.
9952                 This description can also be returned.
9953             """
9954             # Example: see GEOM_TestMeasures.py
9955             if theIsCheckGeom:
9956                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9957                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9958             else:
9959                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9960                 RaiseIfFailed("CheckShape", self.MeasuOp)
9961             if IsValid == 0:
9962                 if theReturnStatus == 0:
9963                     print Status
9964             if theReturnStatus == 1:
9965               return (IsValid, Status)
9966             return IsValid
9967
9968         ## Detect self-intersections in the given shape.
9969         #  @param theShape Shape to check.
9970         #  @return TRUE, if the shape contains no self-intersections.
9971         #
9972         #  @ref tui_measurement_tools_page "Example"
9973         def CheckSelfIntersections(self, theShape):
9974             """
9975             Detect self-intersections in the given shape.
9976
9977             Parameters: 
9978                 theShape Shape to check.
9979
9980             Returns:   
9981                 TRUE, if the shape contains no self-intersections.
9982             """
9983             # Example: see GEOM_TestMeasures.py
9984             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9985             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9986             return IsValid
9987
9988         ## Get position (LCS) of theShape.
9989         #
9990         #  Origin of the LCS is situated at the shape's center of mass.
9991         #  Axes of the LCS are obtained from shape's location or,
9992         #  if the shape is a planar face, from position of its plane.
9993         #
9994         #  @param theShape Shape to calculate position of.
9995         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9996         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9997         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9998         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9999         #
10000         #  @ref swig_todo "Example"
10001         def GetPosition(self,theShape):
10002             """
10003             Get position (LCS) of theShape.
10004             Origin of the LCS is situated at the shape's center of mass.
10005             Axes of the LCS are obtained from shape's location or,
10006             if the shape is a planar face, from position of its plane.
10007
10008             Parameters: 
10009                 theShape Shape to calculate position of.
10010
10011             Returns:  
10012                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10013                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10014                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10015                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10016             """
10017             # Example: see GEOM_TestMeasures.py
10018             aTuple = self.MeasuOp.GetPosition(theShape)
10019             RaiseIfFailed("GetPosition", self.MeasuOp)
10020             return aTuple
10021
10022         ## Get kind of theShape.
10023         #
10024         #  @param theShape Shape to get a kind of.
10025         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10026         #          and a list of parameters, describing the shape.
10027         #  @note  Concrete meaning of each value, returned via \a theIntegers
10028         #         or \a theDoubles list depends on the kind() of the shape.
10029         #
10030         #  @ref swig_todo "Example"
10031         def KindOfShape(self,theShape):
10032             """
10033             Get kind of theShape.
10034          
10035             Parameters: 
10036                 theShape Shape to get a kind of.
10037
10038             Returns:
10039                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10040                     and a list of parameters, describing the shape.
10041             Note:
10042                 Concrete meaning of each value, returned via theIntegers
10043                 or theDoubles list depends on the geompy.kind of the shape
10044             """
10045             # Example: see GEOM_TestMeasures.py
10046             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10047             RaiseIfFailed("KindOfShape", self.MeasuOp)
10048
10049             aKind  = aRoughTuple[0]
10050             anInts = aRoughTuple[1]
10051             aDbls  = aRoughTuple[2]
10052
10053             # Now there is no exception from this rule:
10054             aKindTuple = [aKind] + aDbls + anInts
10055
10056             # If they are we will regroup parameters for such kind of shape.
10057             # For example:
10058             #if aKind == kind.SOME_KIND:
10059             #    #  SOME_KIND     int int double int double double
10060             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10061
10062             return aKindTuple
10063
10064         # end of l2_measure
10065         ## @}
10066
10067         ## @addtogroup l2_import_export
10068         ## @{
10069
10070         ## Import a shape from the BREP or IGES or STEP file
10071         #  (depends on given format) with given name.
10072         #  @param theFileName The file, containing the shape.
10073         #  @param theFormatName Specify format for the file reading.
10074         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10075         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10076         #            format 'STEP_SCALE' is used instead of 'STEP',
10077         #            length unit will be set to 'meter' and result model will be scaled.
10078         #  @param theName Object name; when specified, this parameter is used
10079         #         for result publication in the study. Otherwise, if automatic
10080         #         publication is switched on, default value is used for result name.
10081         #
10082         #  @return New GEOM.GEOM_Object, containing the imported shape.
10083         #
10084         #  @ref swig_Import_Export "Example"
10085         def ImportFile(self, theFileName, theFormatName, theName=None):
10086             """
10087             Import a shape from the BREP or IGES or STEP file
10088             (depends on given format) with given name.
10089
10090             Parameters: 
10091                 theFileName The file, containing the shape.
10092                 theFormatName Specify format for the file reading.
10093                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10094                     If format 'IGES_SCALE' is used instead of 'IGES' or
10095                        format 'STEP_SCALE' is used instead of 'STEP',
10096                        length unit will be set to 'meter' and result model will be scaled.
10097                 theName Object name; when specified, this parameter is used
10098                         for result publication in the study. Otherwise, if automatic
10099                         publication is switched on, default value is used for result name.
10100
10101             Returns:
10102                 New GEOM.GEOM_Object, containing the imported shape.
10103             """
10104             # Example: see GEOM_TestOthers.py
10105             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10106             RaiseIfFailed("ImportFile", self.InsertOp)
10107             self._autoPublish(anObj, theName, "imported")
10108             return anObj
10109
10110         ## Deprecated analog of ImportFile()
10111         def Import(self, theFileName, theFormatName, theName=None):
10112             """
10113             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10114             """
10115             print "WARNING: Function Import is deprecated, use ImportFile instead"
10116             # note: auto-publishing is done in self.ImportFile()
10117             return self.ImportFile(theFileName, theFormatName, theName)
10118
10119         ## Shortcut to ImportFile() for BREP format.
10120         #  Import a shape from the BREP file with given name.
10121         #  @param theFileName The file, containing the shape.
10122         #  @param theName Object name; when specified, this parameter is used
10123         #         for result publication in the study. Otherwise, if automatic
10124         #         publication is switched on, default value is used for result name.
10125         #
10126         #  @return New GEOM.GEOM_Object, containing the imported shape.
10127         #
10128         #  @ref swig_Import_Export "Example"
10129         def ImportBREP(self, theFileName, theName=None):
10130             """
10131             geompy.ImportFile(...) function for BREP format
10132             Import a shape from the BREP file with given name.
10133
10134             Parameters: 
10135                 theFileName The file, containing the shape.
10136                 theName Object name; when specified, this parameter is used
10137                         for result publication in the study. Otherwise, if automatic
10138                         publication is switched on, default value is used for result name.
10139
10140             Returns:
10141                 New GEOM.GEOM_Object, containing the imported shape.
10142             """
10143             # Example: see GEOM_TestOthers.py
10144             # note: auto-publishing is done in self.ImportFile()
10145             return self.ImportFile(theFileName, "BREP", theName)
10146
10147         ## Shortcut to ImportFile() for IGES format
10148         #  Import a shape from the IGES file with given name.
10149         #  @param theFileName The file, containing the shape.
10150         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10151         #                     and result model will be scaled, if its units are not meters.
10152         #                     If False (default), file length units will be taken into account.
10153         #  @param theName Object name; when specified, this parameter is used
10154         #         for result publication in the study. Otherwise, if automatic
10155         #         publication is switched on, default value is used for result name.
10156         #
10157         #  @return New GEOM.GEOM_Object, containing the imported shape.
10158         #
10159         #  @ref swig_Import_Export "Example"
10160         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10161             """
10162             geompy.ImportFile(...) function for IGES format
10163
10164             Parameters:
10165                 theFileName The file, containing the shape.
10166                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10167                             and result model will be scaled, if its units are not meters.
10168                             If False (default), file length units will be taken into account.
10169                 theName Object name; when specified, this parameter is used
10170                         for result publication in the study. Otherwise, if automatic
10171                         publication is switched on, default value is used for result name.
10172
10173             Returns:
10174                 New GEOM.GEOM_Object, containing the imported shape.
10175             """
10176             # Example: see GEOM_TestOthers.py
10177             # note: auto-publishing is done in self.ImportFile()
10178             if ignoreUnits:
10179                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10180             return self.ImportFile(theFileName, "IGES", theName)
10181
10182         ## Return length unit from given IGES file
10183         #  @param theFileName The file, containing the shape.
10184         #  @return String, containing the units name.
10185         #
10186         #  @ref swig_Import_Export "Example"
10187         def GetIGESUnit(self, theFileName):
10188             """
10189             Return length units from given IGES file
10190
10191             Parameters:
10192                 theFileName The file, containing the shape.
10193
10194             Returns:
10195                 String, containing the units name.
10196             """
10197             # Example: see GEOM_TestOthers.py
10198             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10199             return aUnitName
10200
10201         ## Shortcut to ImportFile() for STEP format
10202         #  Import a shape from the STEP file with given name.
10203         #  @param theFileName The file, containing the shape.
10204         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10205         #                     and result model will be scaled, if its units are not meters.
10206         #                     If False (default), file length units will be taken into account.
10207         #  @param theName Object name; when specified, this parameter is used
10208         #         for result publication in the study. Otherwise, if automatic
10209         #         publication is switched on, default value is used for result name.
10210         #
10211         #  @return New GEOM.GEOM_Object, containing the imported shape.
10212         #
10213         #  @ref swig_Import_Export "Example"
10214         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10215             """
10216             geompy.ImportFile(...) function for STEP format
10217
10218             Parameters:
10219                 theFileName The file, containing the shape.
10220                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10221                             and result model will be scaled, if its units are not meters.
10222                             If False (default), file length units will be taken into account.
10223                 theName Object name; when specified, this parameter is used
10224                         for result publication in the study. Otherwise, if automatic
10225                         publication is switched on, default value is used for result name.
10226
10227             Returns:
10228                 New GEOM.GEOM_Object, containing the imported shape.
10229             """
10230             # Example: see GEOM_TestOthers.py
10231             # note: auto-publishing is done in self.ImportFile()
10232             if ignoreUnits:
10233                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10234             return self.ImportFile(theFileName, "STEP", theName)
10235
10236         ## Return length unit from given IGES or STEP file
10237         #  @param theFileName The file, containing the shape.
10238         #  @return String, containing the units name.
10239         #
10240         #  @ref swig_Import_Export "Example"
10241         def GetSTEPUnit(self, theFileName):
10242             """
10243             Return length units from given STEP file
10244
10245             Parameters:
10246                 theFileName The file, containing the shape.
10247
10248             Returns:
10249                 String, containing the units name.
10250             """
10251             # Example: see GEOM_TestOthers.py
10252             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10253             return aUnitName
10254
10255         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10256         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10257         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10258         #  @param theStream The BRep binary stream.
10259         #  @param theName Object name; when specified, this parameter is used
10260         #         for result publication in the study. Otherwise, if automatic
10261         #         publication is switched on, default value is used for result name.
10262         #
10263         #  @return New GEOM_Object, containing the shape, read from theStream.
10264         #
10265         #  @ref swig_Import_Export "Example"
10266         def RestoreShape (self, theStream, theName=None):
10267             """
10268             Read a shape from the binary stream, containing its bounding representation (BRep).
10269
10270             Note:
10271                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10272
10273             Parameters: 
10274                 theStream The BRep binary stream.
10275                 theName Object name; when specified, this parameter is used
10276                         for result publication in the study. Otherwise, if automatic
10277                         publication is switched on, default value is used for result name.
10278
10279             Returns:
10280                 New GEOM_Object, containing the shape, read from theStream.
10281             """
10282             # Example: see GEOM_TestOthers.py
10283             anObj = self.InsertOp.RestoreShape(theStream)
10284             RaiseIfFailed("RestoreShape", self.InsertOp)
10285             self._autoPublish(anObj, theName, "restored")
10286             return anObj
10287
10288         ## Export the given shape into a file with given name.
10289         #  @param theObject Shape to be stored in the file.
10290         #  @param theFileName Name of the file to store the given shape in.
10291         #  @param theFormatName Specify format for the shape storage.
10292         #         Available formats can be obtained with
10293         #         geompy.InsertOp.ExportTranslators()[0] method.
10294         #
10295         #  @ref swig_Import_Export "Example"
10296         def Export(self, theObject, theFileName, theFormatName):
10297             """
10298             Export the given shape into a file with given name.
10299
10300             Parameters: 
10301                 theObject Shape to be stored in the file.
10302                 theFileName Name of the file to store the given shape in.
10303                 theFormatName Specify format for the shape storage.
10304                               Available formats can be obtained with
10305                               geompy.InsertOp.ExportTranslators()[0] method.
10306             """
10307             # Example: see GEOM_TestOthers.py
10308             self.InsertOp.Export(theObject, theFileName, theFormatName)
10309             if self.InsertOp.IsDone() == 0:
10310                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10311                 pass
10312             pass
10313
10314         ## Shortcut to Export() for BREP format
10315         #
10316         #  @ref swig_Import_Export "Example"
10317         def ExportBREP(self,theObject, theFileName):
10318             """
10319             geompy.Export(...) function for BREP format
10320             """
10321             # Example: see GEOM_TestOthers.py
10322             return self.Export(theObject, theFileName, "BREP")
10323
10324         ## Shortcut to Export() for IGES format
10325         #
10326         #  @ref swig_Import_Export "Example"
10327         def ExportIGES(self,theObject, theFileName):
10328             """
10329             geompy.Export(...) function for IGES format
10330             """
10331             # Example: see GEOM_TestOthers.py
10332             return self.Export(theObject, theFileName, "IGES")
10333
10334         ## Shortcut to Export() for STEP format
10335         #
10336         #  @ref swig_Import_Export "Example"
10337         def ExportSTEP(self,theObject, theFileName):
10338             """
10339             geompy.Export(...) function for STEP format
10340             """
10341             # Example: see GEOM_TestOthers.py
10342             return self.Export(theObject, theFileName, "STEP")
10343
10344         # end of l2_import_export
10345         ## @}
10346
10347         ## @addtogroup l3_blocks
10348         ## @{
10349
10350         ## Create a quadrangle face from four edges. Order of Edges is not
10351         #  important. It is  not necessary that edges share the same vertex.
10352         #  @param E1,E2,E3,E4 Edges for the face bound.
10353         #  @param theName Object name; when specified, this parameter is used
10354         #         for result publication in the study. Otherwise, if automatic
10355         #         publication is switched on, default value is used for result name.
10356         #
10357         #  @return New GEOM.GEOM_Object, containing the created face.
10358         #
10359         #  @ref tui_building_by_blocks_page "Example"
10360         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10361             """
10362             Create a quadrangle face from four edges. Order of Edges is not
10363             important. It is  not necessary that edges share the same vertex.
10364
10365             Parameters: 
10366                 E1,E2,E3,E4 Edges for the face bound.
10367                 theName Object name; when specified, this parameter is used
10368                         for result publication in the study. Otherwise, if automatic
10369                         publication is switched on, default value is used for result name.
10370
10371             Returns: 
10372                 New GEOM.GEOM_Object, containing the created face.
10373
10374             Example of usage:               
10375                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10376             """
10377             # Example: see GEOM_Spanner.py
10378             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10379             RaiseIfFailed("MakeQuad", self.BlocksOp)
10380             self._autoPublish(anObj, theName, "quad")
10381             return anObj
10382
10383         ## Create a quadrangle face on two edges.
10384         #  The missing edges will be built by creating the shortest ones.
10385         #  @param E1,E2 Two opposite edges for the face.
10386         #  @param theName Object name; when specified, this parameter is used
10387         #         for result publication in the study. Otherwise, if automatic
10388         #         publication is switched on, default value is used for result name.
10389         #
10390         #  @return New GEOM.GEOM_Object, containing the created face.
10391         #
10392         #  @ref tui_building_by_blocks_page "Example"
10393         def MakeQuad2Edges(self, E1, E2, theName=None):
10394             """
10395             Create a quadrangle face on two edges.
10396             The missing edges will be built by creating the shortest ones.
10397
10398             Parameters: 
10399                 E1,E2 Two opposite edges for the face.
10400                 theName Object name; when specified, this parameter is used
10401                         for result publication in the study. Otherwise, if automatic
10402                         publication is switched on, default value is used for result name.
10403
10404             Returns: 
10405                 New GEOM.GEOM_Object, containing the created face.
10406             
10407             Example of usage:
10408                 # create vertices
10409                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10410                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10411                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10412                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10413                 # create edges
10414                 edge1 = geompy.MakeEdge(p1, p2)
10415                 edge2 = geompy.MakeEdge(p3, p4)
10416                 # create a quadrangle face from two edges
10417                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10418             """
10419             # Example: see GEOM_Spanner.py
10420             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10421             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10422             self._autoPublish(anObj, theName, "quad")
10423             return anObj
10424
10425         ## Create a quadrangle face with specified corners.
10426         #  The missing edges will be built by creating the shortest ones.
10427         #  @param V1,V2,V3,V4 Corner vertices for the face.
10428         #  @param theName Object name; when specified, this parameter is used
10429         #         for result publication in the study. Otherwise, if automatic
10430         #         publication is switched on, default value is used for result name.
10431         #
10432         #  @return New GEOM.GEOM_Object, containing the created face.
10433         #
10434         #  @ref tui_building_by_blocks_page "Example 1"
10435         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10436         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10437             """
10438             Create a quadrangle face with specified corners.
10439             The missing edges will be built by creating the shortest ones.
10440
10441             Parameters: 
10442                 V1,V2,V3,V4 Corner vertices for the face.
10443                 theName Object name; when specified, this parameter is used
10444                         for result publication in the study. Otherwise, if automatic
10445                         publication is switched on, default value is used for result name.
10446
10447             Returns: 
10448                 New GEOM.GEOM_Object, containing the created face.
10449
10450             Example of usage:
10451                 # create vertices
10452                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10453                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10454                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10455                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10456                 # create a quadrangle from four points in its corners
10457                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10458             """
10459             # Example: see GEOM_Spanner.py
10460             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10461             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10462             self._autoPublish(anObj, theName, "quad")
10463             return anObj
10464
10465         ## Create a hexahedral solid, bounded by the six given faces. Order of
10466         #  faces is not important. It is  not necessary that Faces share the same edge.
10467         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10468         #  @param theName Object name; when specified, this parameter is used
10469         #         for result publication in the study. Otherwise, if automatic
10470         #         publication is switched on, default value is used for result name.
10471         #
10472         #  @return New GEOM.GEOM_Object, containing the created solid.
10473         #
10474         #  @ref tui_building_by_blocks_page "Example 1"
10475         #  \n @ref swig_MakeHexa "Example 2"
10476         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10477             """
10478             Create a hexahedral solid, bounded by the six given faces. Order of
10479             faces is not important. It is  not necessary that Faces share the same edge.
10480
10481             Parameters: 
10482                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10483                 theName Object name; when specified, this parameter is used
10484                         for result publication in the study. Otherwise, if automatic
10485                         publication is switched on, default value is used for result name.
10486
10487             Returns:    
10488                 New GEOM.GEOM_Object, containing the created solid.
10489
10490             Example of usage:
10491                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10492             """
10493             # Example: see GEOM_Spanner.py
10494             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10495             RaiseIfFailed("MakeHexa", self.BlocksOp)
10496             self._autoPublish(anObj, theName, "hexa")
10497             return anObj
10498
10499         ## Create a hexahedral solid between two given faces.
10500         #  The missing faces will be built by creating the smallest ones.
10501         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10502         #  @param theName Object name; when specified, this parameter is used
10503         #         for result publication in the study. Otherwise, if automatic
10504         #         publication is switched on, default value is used for result name.
10505         #
10506         #  @return New GEOM.GEOM_Object, containing the created solid.
10507         #
10508         #  @ref tui_building_by_blocks_page "Example 1"
10509         #  \n @ref swig_MakeHexa2Faces "Example 2"
10510         def MakeHexa2Faces(self, F1, F2, theName=None):
10511             """
10512             Create a hexahedral solid between two given faces.
10513             The missing faces will be built by creating the smallest ones.
10514
10515             Parameters: 
10516                 F1,F2 Two opposite faces for the hexahedral solid.
10517                 theName Object name; when specified, this parameter is used
10518                         for result publication in the study. Otherwise, if automatic
10519                         publication is switched on, default value is used for result name.
10520
10521             Returns:
10522                 New GEOM.GEOM_Object, containing the created solid.
10523
10524             Example of usage:
10525                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10526             """
10527             # Example: see GEOM_Spanner.py
10528             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10529             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10530             self._autoPublish(anObj, theName, "hexa")
10531             return anObj
10532
10533         # end of l3_blocks
10534         ## @}
10535
10536         ## @addtogroup l3_blocks_op
10537         ## @{
10538
10539         ## Get a vertex, found in the given shape by its coordinates.
10540         #  @param theShape Block or a compound of blocks.
10541         #  @param theX,theY,theZ Coordinates of the sought vertex.
10542         #  @param theEpsilon Maximum allowed distance between the resulting
10543         #                    vertex and point with the given coordinates.
10544         #  @param theName Object name; when specified, this parameter is used
10545         #         for result publication in the study. Otherwise, if automatic
10546         #         publication is switched on, default value is used for result name.
10547         #
10548         #  @return New GEOM.GEOM_Object, containing the found vertex.
10549         #
10550         #  @ref swig_GetPoint "Example"
10551         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10552             """
10553             Get a vertex, found in the given shape by its coordinates.
10554
10555             Parameters: 
10556                 theShape Block or a compound of blocks.
10557                 theX,theY,theZ Coordinates of the sought vertex.
10558                 theEpsilon Maximum allowed distance between the resulting
10559                            vertex and point with the given coordinates.
10560                 theName Object name; when specified, this parameter is used
10561                         for result publication in the study. Otherwise, if automatic
10562                         publication is switched on, default value is used for result name.
10563
10564             Returns:                  
10565                 New GEOM.GEOM_Object, containing the found vertex.
10566
10567             Example of usage:
10568                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10569             """
10570             # Example: see GEOM_TestOthers.py
10571             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10572             RaiseIfFailed("GetPoint", self.BlocksOp)
10573             self._autoPublish(anObj, theName, "vertex")
10574             return anObj
10575
10576         ## Find a vertex of the given shape, which has minimal distance to the given point.
10577         #  @param theShape Any shape.
10578         #  @param thePoint Point, close to the desired vertex.
10579         #  @param 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         #  @return New GEOM.GEOM_Object, containing the found vertex.
10584         #
10585         #  @ref swig_GetVertexNearPoint "Example"
10586         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10587             """
10588             Find a vertex of the given shape, which has minimal distance to the given point.
10589
10590             Parameters: 
10591                 theShape Any shape.
10592                 thePoint Point, close to the desired vertex.
10593                 theName Object name; when specified, this parameter is used
10594                         for result publication in the study. Otherwise, if automatic
10595                         publication is switched on, default value is used for result name.
10596
10597             Returns:
10598                 New GEOM.GEOM_Object, containing the found vertex.
10599
10600             Example of usage:
10601                 pmidle = geompy.MakeVertex(50, 0, 50)
10602                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10603             """
10604             # Example: see GEOM_TestOthers.py
10605             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10606             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10607             self._autoPublish(anObj, theName, "vertex")
10608             return anObj
10609
10610         ## Get an edge, found in the given shape by two given vertices.
10611         #  @param theShape Block or a compound of blocks.
10612         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10613         #  @param theName Object name; when specified, this parameter is used
10614         #         for result publication in the study. Otherwise, if automatic
10615         #         publication is switched on, default value is used for result name.
10616         #
10617         #  @return New GEOM.GEOM_Object, containing the found edge.
10618         #
10619         #  @ref swig_GetEdge "Example"
10620         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10621             """
10622             Get an edge, found in the given shape by two given vertices.
10623
10624             Parameters: 
10625                 theShape Block or a compound of blocks.
10626                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10627                 theName Object name; when specified, this parameter is used
10628                         for result publication in the study. Otherwise, if automatic
10629                         publication is switched on, default value is used for result name.
10630
10631             Returns:
10632                 New GEOM.GEOM_Object, containing the found edge.
10633             """
10634             # Example: see GEOM_Spanner.py
10635             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10636             RaiseIfFailed("GetEdge", self.BlocksOp)
10637             self._autoPublish(anObj, theName, "edge")
10638             return anObj
10639
10640         ## Find an edge of the given shape, which has minimal distance to the given point.
10641         #  @param theShape Block or a compound of blocks.
10642         #  @param thePoint Point, close to the desired edge.
10643         #  @param theName Object name; when specified, this parameter is used
10644         #         for result publication in the study. Otherwise, if automatic
10645         #         publication is switched on, default value is used for result name.
10646         #
10647         #  @return New GEOM.GEOM_Object, containing the found edge.
10648         #
10649         #  @ref swig_GetEdgeNearPoint "Example"
10650         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10651             """
10652             Find an edge of the given shape, which has minimal distance to the given point.
10653
10654             Parameters: 
10655                 theShape Block or a compound of blocks.
10656                 thePoint Point, close to the desired edge.
10657                 theName Object name; when specified, this parameter is used
10658                         for result publication in the study. Otherwise, if automatic
10659                         publication is switched on, default value is used for result name.
10660
10661             Returns:
10662                 New GEOM.GEOM_Object, containing the found edge.
10663             """
10664             # Example: see GEOM_TestOthers.py
10665             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10666             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10667             self._autoPublish(anObj, theName, "edge")
10668             return anObj
10669
10670         ## Returns a face, found in the given shape by four given corner vertices.
10671         #  @param theShape Block or a compound of blocks.
10672         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10673         #  @param theName Object name; when specified, this parameter is used
10674         #         for result publication in the study. Otherwise, if automatic
10675         #         publication is switched on, default value is used for result name.
10676         #
10677         #  @return New GEOM.GEOM_Object, containing the found face.
10678         #
10679         #  @ref swig_todo "Example"
10680         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10681             """
10682             Returns a face, found in the given shape by four given corner vertices.
10683
10684             Parameters:
10685                 theShape Block or a compound of blocks.
10686                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10687                 theName Object name; when specified, this parameter is used
10688                         for result publication in the study. Otherwise, if automatic
10689                         publication is switched on, default value is used for result name.
10690
10691             Returns:
10692                 New GEOM.GEOM_Object, containing the found face.
10693             """
10694             # Example: see GEOM_Spanner.py
10695             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10696             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10697             self._autoPublish(anObj, theName, "face")
10698             return anObj
10699
10700         ## Get a face of block, found in the given shape by two given edges.
10701         #  @param theShape Block or a compound of blocks.
10702         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10703         #  @param theName Object name; when specified, this parameter is used
10704         #         for result publication in the study. Otherwise, if automatic
10705         #         publication is switched on, default value is used for result name.
10706         #
10707         #  @return New GEOM.GEOM_Object, containing the found face.
10708         #
10709         #  @ref swig_todo "Example"
10710         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10711             """
10712             Get a face of block, found in the given shape by two given edges.
10713
10714             Parameters:
10715                 theShape Block or a compound of blocks.
10716                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10717                 theName Object name; when specified, this parameter is used
10718                         for result publication in the study. Otherwise, if automatic
10719                         publication is switched on, default value is used for result name.
10720
10721             Returns:
10722                 New GEOM.GEOM_Object, containing the found face.
10723             """
10724             # Example: see GEOM_Spanner.py
10725             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10726             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10727             self._autoPublish(anObj, theName, "face")
10728             return anObj
10729
10730         ## Find a face, opposite to the given one in the given block.
10731         #  @param theBlock Must be a hexahedral solid.
10732         #  @param theFace Face of \a theBlock, opposite to the desired face.
10733         #  @param theName Object name; when specified, this parameter is used
10734         #         for result publication in the study. Otherwise, if automatic
10735         #         publication is switched on, default value is used for result name.
10736         #
10737         #  @return New GEOM.GEOM_Object, containing the found face.
10738         #
10739         #  @ref swig_GetOppositeFace "Example"
10740         def GetOppositeFace(self, theBlock, theFace, theName=None):
10741             """
10742             Find a face, opposite to the given one in the given block.
10743
10744             Parameters:
10745                 theBlock Must be a hexahedral solid.
10746                 theFace Face of theBlock, opposite to the desired face.
10747                 theName Object name; when specified, this parameter is used
10748                         for result publication in the study. Otherwise, if automatic
10749                         publication is switched on, default value is used for result name.
10750
10751             Returns: 
10752                 New GEOM.GEOM_Object, containing the found face.
10753             """
10754             # Example: see GEOM_Spanner.py
10755             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10756             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10757             self._autoPublish(anObj, theName, "face")
10758             return anObj
10759
10760         ## Find a face of the given shape, which has minimal distance to the given point.
10761         #  @param theShape Block or a compound of blocks.
10762         #  @param thePoint Point, close to the desired face.
10763         #  @param theName Object name; when specified, this parameter is used
10764         #         for result publication in the study. Otherwise, if automatic
10765         #         publication is switched on, default value is used for result name.
10766         #
10767         #  @return New GEOM.GEOM_Object, containing the found face.
10768         #
10769         #  @ref swig_GetFaceNearPoint "Example"
10770         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10771             """
10772             Find a face of the given shape, which has minimal distance to the given point.
10773
10774             Parameters:
10775                 theShape Block or a compound of blocks.
10776                 thePoint Point, close to the desired face.
10777                 theName Object name; when specified, this parameter is used
10778                         for result publication in the study. Otherwise, if automatic
10779                         publication is switched on, default value is used for result name.
10780
10781             Returns:
10782                 New GEOM.GEOM_Object, containing the found face.
10783             """
10784             # Example: see GEOM_Spanner.py
10785             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10786             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10787             self._autoPublish(anObj, theName, "face")
10788             return anObj
10789
10790         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10791         #  @param theBlock Block or a compound of blocks.
10792         #  @param theVector Vector, close to the normale of the desired face.
10793         #  @param theName Object name; when specified, this parameter is used
10794         #         for result publication in the study. Otherwise, if automatic
10795         #         publication is switched on, default value is used for result name.
10796         #
10797         #  @return New GEOM.GEOM_Object, containing the found face.
10798         #
10799         #  @ref swig_todo "Example"
10800         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10801             """
10802             Find a face of block, whose outside normale has minimal angle with the given vector.
10803
10804             Parameters:
10805                 theBlock Block or a compound of blocks.
10806                 theVector Vector, close to the normale of the desired face.
10807                 theName Object name; when specified, this parameter is used
10808                         for result publication in the study. Otherwise, if automatic
10809                         publication is switched on, default value is used for result name.
10810
10811             Returns:
10812                 New GEOM.GEOM_Object, containing the found face.
10813             """
10814             # Example: see GEOM_Spanner.py
10815             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10816             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10817             self._autoPublish(anObj, theName, "face")
10818             return anObj
10819
10820         ## Find all sub-shapes of type \a theShapeType of the given shape,
10821         #  which have minimal distance to the given point.
10822         #  @param theShape Any shape.
10823         #  @param thePoint Point, close to the desired shape.
10824         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10825         #  @param theTolerance The tolerance for distances comparison. All shapes
10826         #                      with distances to the given point in interval
10827         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10828         #  @param theName Object name; when specified, this parameter is used
10829         #         for result publication in the study. Otherwise, if automatic
10830         #         publication is switched on, default value is used for result name.
10831         #
10832         #  @return New GEOM_Object, containing a group of all found shapes.
10833         #
10834         #  @ref swig_GetShapesNearPoint "Example"
10835         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10836             """
10837             Find all sub-shapes of type theShapeType of the given shape,
10838             which have minimal distance to the given point.
10839
10840             Parameters:
10841                 theShape Any shape.
10842                 thePoint Point, close to the desired shape.
10843                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10844                 theTolerance The tolerance for distances comparison. All shapes
10845                                 with distances to the given point in interval
10846                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10847                 theName Object name; when specified, this parameter is used
10848                         for result publication in the study. Otherwise, if automatic
10849                         publication is switched on, default value is used for result name.
10850
10851             Returns:
10852                 New GEOM_Object, containing a group of all found shapes.
10853             """
10854             # Example: see GEOM_TestOthers.py
10855             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10856             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10857             self._autoPublish(anObj, theName, "group")
10858             return anObj
10859
10860         # end of l3_blocks_op
10861         ## @}
10862
10863         ## @addtogroup l4_blocks_measure
10864         ## @{
10865
10866         ## Check, if the compound of blocks is given.
10867         #  To be considered as a compound of blocks, the
10868         #  given shape must satisfy the following conditions:
10869         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10870         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10871         #  - The compound should be connexe.
10872         #  - The glue between two quadrangle faces should be applied.
10873         #  @param theCompound The compound to check.
10874         #  @return TRUE, if the given shape is a compound of blocks.
10875         #  If theCompound is not valid, prints all discovered errors.
10876         #
10877         #  @ref tui_measurement_tools_page "Example 1"
10878         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10879         def CheckCompoundOfBlocks(self,theCompound):
10880             """
10881             Check, if the compound of blocks is given.
10882             To be considered as a compound of blocks, the
10883             given shape must satisfy the following conditions:
10884             - Each element of the compound should be a Block (6 faces and 12 edges).
10885             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10886             - The compound should be connexe.
10887             - The glue between two quadrangle faces should be applied.
10888
10889             Parameters:
10890                 theCompound The compound to check.
10891
10892             Returns:
10893                 TRUE, if the given shape is a compound of blocks.
10894                 If theCompound is not valid, prints all discovered errors.            
10895             """
10896             # Example: see GEOM_Spanner.py
10897             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10898             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10899             if IsValid == 0:
10900                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10901                 print Descr
10902             return IsValid
10903
10904         ## Retrieve all non blocks solids and faces from \a theShape.
10905         #  @param theShape The shape to explore.
10906         #  @param theName Object name; when specified, this parameter is used
10907         #         for result publication in the study. Otherwise, if automatic
10908         #         publication is switched on, default value is used for result name.
10909         #
10910         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10911         #          non block solids (= not 6 faces, or with 6 faces, but with the
10912         #          presence of non-quadrangular faces). The second object is a
10913         #          group of all non quadrangular faces.
10914         #
10915         #  @ref tui_measurement_tools_page "Example 1"
10916         #  \n @ref swig_GetNonBlocks "Example 2"
10917         def GetNonBlocks (self, theShape, theName=None):
10918             """
10919             Retrieve all non blocks solids and faces from theShape.
10920
10921             Parameters:
10922                 theShape The shape to explore.
10923                 theName Object name; when specified, this parameter is used
10924                         for result publication in the study. Otherwise, if automatic
10925                         publication is switched on, default value is used for result name.
10926
10927             Returns:
10928                 A tuple of two GEOM_Objects. The first object is a group of all
10929                 non block solids (= not 6 faces, or with 6 faces, but with the
10930                 presence of non-quadrangular faces). The second object is a
10931                 group of all non quadrangular faces.
10932
10933             Usage:
10934                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10935             """
10936             # Example: see GEOM_Spanner.py
10937             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10938             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10939             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10940             return aTuple
10941
10942         ## Remove all seam and degenerated edges from \a theShape.
10943         #  Unite faces and edges, sharing one surface. It means that
10944         #  this faces must have references to one C++ surface object (handle).
10945         #  @param theShape The compound or single solid to remove irregular edges from.
10946         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10947         #         do not unite faces.
10948         #  @param theName Object name; when specified, this parameter is used
10949         #         for result publication in the study. Otherwise, if automatic
10950         #         publication is switched on, default value is used for result name.
10951         #
10952         #  @return Improved shape.
10953         #
10954         #  @ref swig_RemoveExtraEdges "Example"
10955         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10956             """
10957             Remove all seam and degenerated edges from theShape.
10958             Unite faces and edges, sharing one surface. It means that
10959             this faces must have references to one C++ surface object (handle).
10960
10961             Parameters:
10962                 theShape The compound or single solid to remove irregular edges from.
10963                 doUnionFaces If True, then unite faces. If False (the default value),
10964                              do not unite faces.
10965                 theName Object name; when specified, this parameter is used
10966                         for result publication in the study. Otherwise, if automatic
10967                         publication is switched on, default value is used for result name.
10968
10969             Returns: 
10970                 Improved shape.
10971             """
10972             # Example: see GEOM_TestOthers.py
10973             nbFacesOptimum = -1 # -1 means do not unite faces
10974             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10975             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10976             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10977             self._autoPublish(anObj, theName, "removeExtraEdges")
10978             return anObj
10979
10980         ## Performs union faces of \a theShape
10981         #  Unite faces sharing one surface. It means that
10982         #  these faces must have references to one C++ surface object (handle).
10983         #  @param theShape The compound or single solid that contains faces
10984         #         to perform union.
10985         #  @param theName Object name; when specified, this parameter is used
10986         #         for result publication in the study. Otherwise, if automatic
10987         #         publication is switched on, default value is used for result name.
10988         #
10989         #  @return Improved shape.
10990         #
10991         #  @ref swig_UnionFaces "Example"
10992         def UnionFaces(self, theShape, theName=None):
10993             """
10994             Performs union faces of theShape.
10995             Unite faces sharing one surface. It means that
10996             these faces must have references to one C++ surface object (handle).
10997
10998             Parameters:
10999                 theShape The compound or single solid that contains faces
11000                          to perform union.
11001                 theName Object name; when specified, this parameter is used
11002                         for result publication in the study. Otherwise, if automatic
11003                         publication is switched on, default value is used for result name.
11004
11005             Returns: 
11006                 Improved shape.
11007             """
11008             # Example: see GEOM_TestOthers.py
11009             anObj = self.BlocksOp.UnionFaces(theShape)
11010             RaiseIfFailed("UnionFaces", self.BlocksOp)
11011             self._autoPublish(anObj, theName, "unionFaces")
11012             return anObj
11013
11014         ## Check, if the given shape is a blocks compound.
11015         #  Fix all detected errors.
11016         #    \note Single block can be also fixed by this method.
11017         #  @param theShape The compound to check and improve.
11018         #  @param theName Object name; when specified, this parameter is used
11019         #         for result publication in the study. Otherwise, if automatic
11020         #         publication is switched on, default value is used for result name.
11021         #
11022         #  @return Improved compound.
11023         #
11024         #  @ref swig_CheckAndImprove "Example"
11025         def CheckAndImprove(self, theShape, theName=None):
11026             """
11027             Check, if the given shape is a blocks compound.
11028             Fix all detected errors.
11029
11030             Note:
11031                 Single block can be also fixed by this method.
11032
11033             Parameters:
11034                 theShape The compound to check and improve.
11035                 theName Object name; when specified, this parameter is used
11036                         for result publication in the study. Otherwise, if automatic
11037                         publication is switched on, default value is used for result name.
11038
11039             Returns: 
11040                 Improved compound.
11041             """
11042             # Example: see GEOM_TestOthers.py
11043             anObj = self.BlocksOp.CheckAndImprove(theShape)
11044             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11045             self._autoPublish(anObj, theName, "improved")
11046             return anObj
11047
11048         # end of l4_blocks_measure
11049         ## @}
11050
11051         ## @addtogroup l3_blocks_op
11052         ## @{
11053
11054         ## Get all the blocks, contained in the given compound.
11055         #  @param theCompound The compound to explode.
11056         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11057         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11058         #  @param theName Object name; when specified, this parameter is used
11059         #         for result publication in the study. Otherwise, if automatic
11060         #         publication is switched on, default value is used for result name.
11061         #
11062         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11063         #
11064         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11065         #
11066         #  @ref tui_explode_on_blocks "Example 1"
11067         #  \n @ref swig_MakeBlockExplode "Example 2"
11068         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11069             """
11070             Get all the blocks, contained in the given compound.
11071
11072             Parameters:
11073                 theCompound The compound to explode.
11074                 theMinNbFaces If solid has lower number of faces, it is not a block.
11075                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11076                 theName Object name; when specified, this parameter is used
11077                         for result publication in the study. Otherwise, if automatic
11078                         publication is switched on, default value is used for result name.
11079
11080             Note:
11081                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11082
11083             Returns:  
11084                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11085             """
11086             # Example: see GEOM_TestOthers.py
11087             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11088             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11089             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11090             for anObj in aList:
11091                 anObj.SetParameters(Parameters)
11092                 pass
11093             self._autoPublish(aList, theName, "block")
11094             return aList
11095
11096         ## Find block, containing the given point inside its volume or on boundary.
11097         #  @param theCompound Compound, to find block in.
11098         #  @param thePoint Point, close to the desired block. If the point lays on
11099         #         boundary between some blocks, we return block with nearest center.
11100         #  @param theName Object name; when specified, this parameter is used
11101         #         for result publication in the study. Otherwise, if automatic
11102         #         publication is switched on, default value is used for result name.
11103         #
11104         #  @return New GEOM.GEOM_Object, containing the found block.
11105         #
11106         #  @ref swig_todo "Example"
11107         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11108             """
11109             Find block, containing the given point inside its volume or on boundary.
11110
11111             Parameters:
11112                 theCompound Compound, to find block in.
11113                 thePoint Point, close to the desired block. If the point lays on
11114                          boundary between some blocks, we return block with nearest center.
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 found block.
11121             """
11122             # Example: see GEOM_Spanner.py
11123             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11124             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11125             self._autoPublish(anObj, theName, "block")
11126             return anObj
11127
11128         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11129         #  @param theCompound Compound, to find block in.
11130         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11131         #  @param theName Object name; when specified, this parameter is used
11132         #         for result publication in the study. Otherwise, if automatic
11133         #         publication is switched on, default value is used for result name.
11134         #
11135         #  @return New GEOM.GEOM_Object, containing the found block.
11136         #
11137         #  @ref swig_GetBlockByParts "Example"
11138         def GetBlockByParts(self, theCompound, theParts, theName=None):
11139             """
11140              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11141
11142              Parameters:
11143                 theCompound Compound, to find block in.
11144                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11145                 theName Object name; when specified, this parameter is used
11146                         for result publication in the study. Otherwise, if automatic
11147                         publication is switched on, default value is used for result name.
11148
11149             Returns: 
11150                 New GEOM_Object, containing the found block.
11151             """
11152             # Example: see GEOM_TestOthers.py
11153             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11154             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11155             self._autoPublish(anObj, theName, "block")
11156             return anObj
11157
11158         ## Return all blocks, containing all the elements, passed as the parts.
11159         #  @param theCompound Compound, to find blocks in.
11160         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11161         #  @param theName Object name; when specified, this parameter is used
11162         #         for result publication in the study. Otherwise, if automatic
11163         #         publication is switched on, default value is used for result name.
11164         #
11165         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11166         #
11167         #  @ref swig_todo "Example"
11168         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11169             """
11170             Return all blocks, containing all the elements, passed as the parts.
11171
11172             Parameters:
11173                 theCompound Compound, to find blocks in.
11174                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11175                 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             Returns:
11180                 List of GEOM.GEOM_Object, containing the found blocks.
11181             """
11182             # Example: see GEOM_Spanner.py
11183             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11184             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11185             self._autoPublish(aList, theName, "block")
11186             return aList
11187
11188         ## Multi-transformate block and glue the result.
11189         #  Transformation is defined so, as to superpose direction faces.
11190         #  @param Block Hexahedral solid to be multi-transformed.
11191         #  @param DirFace1 ID of First direction face.
11192         #  @param DirFace2 ID of Second direction face.
11193         #  @param NbTimes Quantity of transformations to be done.
11194         #  @param theName Object name; when specified, this parameter is used
11195         #         for result publication in the study. Otherwise, if automatic
11196         #         publication is switched on, default value is used for result name.
11197         #
11198         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11199         #
11200         #  @return New GEOM.GEOM_Object, containing the result shape.
11201         #
11202         #  @ref tui_multi_transformation "Example"
11203         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11204             """
11205             Multi-transformate block and glue the result.
11206             Transformation is defined so, as to superpose direction faces.
11207
11208             Parameters:
11209                 Block Hexahedral solid to be multi-transformed.
11210                 DirFace1 ID of First direction face.
11211                 DirFace2 ID of Second direction face.
11212                 NbTimes Quantity of transformations to be done.
11213                 theName Object name; when specified, this parameter is used
11214                         for result publication in the study. Otherwise, if automatic
11215                         publication is switched on, default value is used for result name.
11216
11217             Note:
11218                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11219
11220             Returns:
11221                 New GEOM.GEOM_Object, containing the result shape.
11222             """
11223             # Example: see GEOM_Spanner.py
11224             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11225             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11226             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11227             anObj.SetParameters(Parameters)
11228             self._autoPublish(anObj, theName, "transformed")
11229             return anObj
11230
11231         ## Multi-transformate block and glue the result.
11232         #  @param Block Hexahedral solid to be multi-transformed.
11233         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11234         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11235         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11236         #  @param theName Object name; when specified, this parameter is used
11237         #         for result publication in the study. Otherwise, if automatic
11238         #         publication is switched on, default value is used for result name.
11239         #
11240         #  @return New GEOM.GEOM_Object, containing the result shape.
11241         #
11242         #  @ref tui_multi_transformation "Example"
11243         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11244                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11245             """
11246             Multi-transformate block and glue the result.
11247
11248             Parameters:
11249                 Block Hexahedral solid to be multi-transformed.
11250                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11251                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11252                 NbTimesU,NbTimesV Quantity of transformations to be done.
11253                 theName Object name; when specified, this parameter is used
11254                         for result publication in the study. Otherwise, if automatic
11255                         publication is switched on, default value is used for result name.
11256
11257             Returns:
11258                 New GEOM.GEOM_Object, containing the result shape.
11259             """
11260             # Example: see GEOM_Spanner.py
11261             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11262               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11263             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11264                                                             DirFace1V, DirFace2V, NbTimesV)
11265             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11266             anObj.SetParameters(Parameters)
11267             self._autoPublish(anObj, theName, "transformed")
11268             return anObj
11269
11270         ## Build all possible propagation groups.
11271         #  Propagation group is a set of all edges, opposite to one (main)
11272         #  edge of this group directly or through other opposite edges.
11273         #  Notion of Opposite Edge make sence only on quadrangle face.
11274         #  @param theShape Shape to build propagation groups on.
11275         #  @param theName Object name; when specified, this parameter is used
11276         #         for result publication in the study. Otherwise, if automatic
11277         #         publication is switched on, default value is used for result name.
11278         #
11279         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11280         #
11281         #  @ref swig_Propagate "Example"
11282         def Propagate(self, theShape, theName=None):
11283             """
11284             Build all possible propagation groups.
11285             Propagation group is a set of all edges, opposite to one (main)
11286             edge of this group directly or through other opposite edges.
11287             Notion of Opposite Edge make sence only on quadrangle face.
11288
11289             Parameters:
11290                 theShape Shape to build propagation groups on.
11291                 theName Object name; when specified, this parameter is used
11292                         for result publication in the study. Otherwise, if automatic
11293                         publication is switched on, default value is used for result name.
11294
11295             Returns:
11296                 List of GEOM.GEOM_Object, each of them is a propagation group.
11297             """
11298             # Example: see GEOM_TestOthers.py
11299             listChains = self.BlocksOp.Propagate(theShape)
11300             RaiseIfFailed("Propagate", self.BlocksOp)
11301             self._autoPublish(listChains, theName, "propagate")
11302             return listChains
11303
11304         # end of l3_blocks_op
11305         ## @}
11306
11307         ## @addtogroup l3_groups
11308         ## @{
11309
11310         ## Creates a new group which will store sub-shapes of theMainShape
11311         #  @param theMainShape is a GEOM object on which the group is selected
11312         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11313         #  @param theName Object name; when specified, this parameter is used
11314         #         for result publication in the study. Otherwise, if automatic
11315         #         publication is switched on, default value is used for result name.
11316         #
11317         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11318         #
11319         #  @ref tui_working_with_groups_page "Example 1"
11320         #  \n @ref swig_CreateGroup "Example 2"
11321         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11322             """
11323             Creates a new group which will store sub-shapes of theMainShape
11324
11325             Parameters:
11326                theMainShape is a GEOM object on which the group is selected
11327                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11328                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11329                 theName Object name; when specified, this parameter is used
11330                         for result publication in the study. Otherwise, if automatic
11331                         publication is switched on, default value is used for result name.
11332
11333             Returns:
11334                a newly created GEOM group
11335
11336             Example of usage:
11337                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11338                 
11339             """
11340             # Example: see GEOM_TestOthers.py
11341             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11342             RaiseIfFailed("CreateGroup", self.GroupOp)
11343             self._autoPublish(anObj, theName, "group")
11344             return anObj
11345
11346         ## Adds a sub-object with ID theSubShapeId to the group
11347         #  @param theGroup is a GEOM group to which the new sub-shape is added
11348         #  @param theSubShapeID is a sub-shape ID in the main object.
11349         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11350         #
11351         #  @ref tui_working_with_groups_page "Example"
11352         def AddObject(self,theGroup, theSubShapeID):
11353             """
11354             Adds a sub-object with ID theSubShapeId to the group
11355
11356             Parameters:
11357                 theGroup       is a GEOM group to which the new sub-shape is added
11358                 theSubShapeID  is a sub-shape ID in the main object.
11359
11360             Note:
11361                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11362             """
11363             # Example: see GEOM_TestOthers.py
11364             self.GroupOp.AddObject(theGroup, theSubShapeID)
11365             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11366                 RaiseIfFailed("AddObject", self.GroupOp)
11367                 pass
11368             pass
11369
11370         ## Removes a sub-object with ID \a theSubShapeId from the group
11371         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11372         #  @param theSubShapeID is a sub-shape ID in the main object.
11373         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11374         #
11375         #  @ref tui_working_with_groups_page "Example"
11376         def RemoveObject(self,theGroup, theSubShapeID):
11377             """
11378             Removes a sub-object with ID theSubShapeId from the group
11379
11380             Parameters:
11381                 theGroup is a GEOM group from which the new sub-shape is removed
11382                 theSubShapeID is a sub-shape ID in the main object.
11383
11384             Note:
11385                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11386             """
11387             # Example: see GEOM_TestOthers.py
11388             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11389             RaiseIfFailed("RemoveObject", self.GroupOp)
11390             pass
11391
11392         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11393         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11394         #  @param theSubShapes is a list of sub-shapes to be added.
11395         #
11396         #  @ref tui_working_with_groups_page "Example"
11397         def UnionList (self,theGroup, theSubShapes):
11398             """
11399             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11400
11401             Parameters:
11402                 theGroup is a GEOM group to which the new sub-shapes are added.
11403                 theSubShapes is a list of sub-shapes to be added.
11404             """
11405             # Example: see GEOM_TestOthers.py
11406             self.GroupOp.UnionList(theGroup, theSubShapes)
11407             RaiseIfFailed("UnionList", self.GroupOp)
11408             pass
11409
11410         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11411         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11412         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11413         #
11414         #  @ref swig_UnionIDs "Example"
11415         def UnionIDs(self,theGroup, theSubShapes):
11416             """
11417             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11418
11419             Parameters:
11420                 theGroup is a GEOM group to which the new sub-shapes are added.
11421                 theSubShapes is a list of indices of sub-shapes to be added.
11422             """
11423             # Example: see GEOM_TestOthers.py
11424             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11425             RaiseIfFailed("UnionIDs", self.GroupOp)
11426             pass
11427
11428         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11429         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11430         #  @param theSubShapes is a list of sub-shapes to be removed.
11431         #
11432         #  @ref tui_working_with_groups_page "Example"
11433         def DifferenceList (self,theGroup, theSubShapes):
11434             """
11435             Removes from the group all the given shapes. No errors, if some shapes are not included.
11436
11437             Parameters:
11438                 theGroup is a GEOM group from which the sub-shapes are removed.
11439                 theSubShapes is a list of sub-shapes to be removed.
11440             """
11441             # Example: see GEOM_TestOthers.py
11442             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11443             RaiseIfFailed("DifferenceList", self.GroupOp)
11444             pass
11445
11446         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11447         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11448         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11449         #
11450         #  @ref swig_DifferenceIDs "Example"
11451         def DifferenceIDs(self,theGroup, theSubShapes):
11452             """
11453             Removes from the group all the given shapes. No errors, if some shapes are not included.
11454
11455             Parameters:
11456                 theGroup is a GEOM group from which the sub-shapes are removed.
11457                 theSubShapes is a list of indices of sub-shapes to be removed.
11458             """            
11459             # Example: see GEOM_TestOthers.py
11460             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11461             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11462             pass
11463
11464         ## Union of two groups.
11465         #  New group is created. It will contain all entities
11466         #  which are present in groups theGroup1 and theGroup2.
11467         #  @param theGroup1, theGroup2 are the initial GEOM groups
11468         #                              to create the united group from.
11469         #  @param theName Object name; when specified, this parameter is used
11470         #         for result publication in the study. Otherwise, if automatic
11471         #         publication is switched on, default value is used for result name.
11472         #
11473         #  @return a newly created GEOM group.
11474         #
11475         #  @ref tui_union_groups_anchor "Example"
11476         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11477             """
11478             Union of two groups.
11479             New group is created. It will contain all entities
11480             which are present in groups theGroup1 and theGroup2.
11481
11482             Parameters:
11483                 theGroup1, theGroup2 are the initial GEOM groups
11484                                      to create the united group from.
11485                 theName Object name; when specified, this parameter is used
11486                         for result publication in the study. Otherwise, if automatic
11487                         publication is switched on, default value is used for result name.
11488
11489             Returns:
11490                 a newly created GEOM group.
11491             """
11492             # Example: see GEOM_TestOthers.py
11493             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11494             RaiseIfFailed("UnionGroups", self.GroupOp)
11495             self._autoPublish(aGroup, theName, "group")
11496             return aGroup
11497
11498         ## Intersection of two groups.
11499         #  New group is created. It will contain only those entities
11500         #  which are present in both groups theGroup1 and theGroup2.
11501         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11502         #  @param theName Object name; when specified, this parameter is used
11503         #         for result publication in the study. Otherwise, if automatic
11504         #         publication is switched on, default value is used for result name.
11505         #
11506         #  @return a newly created GEOM group.
11507         #
11508         #  @ref tui_intersect_groups_anchor "Example"
11509         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11510             """
11511             Intersection of two groups.
11512             New group is created. It will contain only those entities
11513             which are present in both groups theGroup1 and theGroup2.
11514
11515             Parameters:
11516                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11517                 theName Object name; when specified, this parameter is used
11518                         for result publication in the study. Otherwise, if automatic
11519                         publication is switched on, default value is used for result name.
11520
11521             Returns:
11522                 a newly created GEOM group.
11523             """
11524             # Example: see GEOM_TestOthers.py
11525             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11526             RaiseIfFailed("IntersectGroups", self.GroupOp)
11527             self._autoPublish(aGroup, theName, "group")
11528             return aGroup
11529
11530         ## Cut of two groups.
11531         #  New group is created. It will contain entities which are
11532         #  present in group theGroup1 but are not present in group theGroup2.
11533         #  @param theGroup1 is a GEOM group to include elements of.
11534         #  @param theGroup2 is a GEOM group to exclude elements of.
11535         #  @param theName Object name; when specified, this parameter is used
11536         #         for result publication in the study. Otherwise, if automatic
11537         #         publication is switched on, default value is used for result name.
11538         #
11539         #  @return a newly created GEOM group.
11540         #
11541         #  @ref tui_cut_groups_anchor "Example"
11542         def CutGroups (self, theGroup1, theGroup2, theName=None):
11543             """
11544             Cut of two groups.
11545             New group is created. It will contain entities which are
11546             present in group theGroup1 but are not present in group theGroup2.
11547
11548             Parameters:
11549                 theGroup1 is a GEOM group to include elements of.
11550                 theGroup2 is a GEOM group to exclude elements of.
11551                 theName Object name; when specified, this parameter is used
11552                         for result publication in the study. Otherwise, if automatic
11553                         publication is switched on, default value is used for result name.
11554
11555             Returns:
11556                 a newly created GEOM group.
11557             """
11558             # Example: see GEOM_TestOthers.py
11559             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11560             RaiseIfFailed("CutGroups", self.GroupOp)
11561             self._autoPublish(aGroup, theName, "group")
11562             return aGroup
11563
11564         ## Union of list of groups.
11565         #  New group is created. It will contain all entities that are
11566         #  present in groups listed in theGList.
11567         #  @param theGList is a list of GEOM groups to create the united group from.
11568         #  @param theName Object name; when specified, this parameter is used
11569         #         for result publication in the study. Otherwise, if automatic
11570         #         publication is switched on, default value is used for result name.
11571         #
11572         #  @return a newly created GEOM group.
11573         #
11574         #  @ref tui_union_groups_anchor "Example"
11575         def UnionListOfGroups (self, theGList, theName=None):
11576             """
11577             Union of list of groups.
11578             New group is created. It will contain all entities that are
11579             present in groups listed in theGList.
11580
11581             Parameters:
11582                 theGList is a list of GEOM groups to create the united group from.
11583                 theName Object name; when specified, this parameter is used
11584                         for result publication in the study. Otherwise, if automatic
11585                         publication is switched on, default value is used for result name.
11586
11587             Returns:
11588                 a newly created GEOM group.
11589             """
11590             # Example: see GEOM_TestOthers.py
11591             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11592             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11593             self._autoPublish(aGroup, theName, "group")
11594             return aGroup
11595
11596         ## Cut of lists of groups.
11597         #  New group is created. It will contain only entities
11598         #  which are present in groups listed in theGList.
11599         #  @param theGList is a list of GEOM groups to include elements of.
11600         #  @param theName Object name; when specified, this parameter is used
11601         #         for result publication in the study. Otherwise, if automatic
11602         #         publication is switched on, default value is used for result name.
11603         #
11604         #  @return a newly created GEOM group.
11605         #
11606         #  @ref tui_intersect_groups_anchor "Example"
11607         def IntersectListOfGroups (self, theGList, theName=None):
11608             """
11609             Cut of lists of groups.
11610             New group is created. It will contain only entities
11611             which are present in groups listed in theGList.
11612
11613             Parameters:
11614                 theGList is a list of GEOM groups to include elements of.
11615                 theName Object name; when specified, this parameter is used
11616                         for result publication in the study. Otherwise, if automatic
11617                         publication is switched on, default value is used for result name.
11618
11619             Returns:
11620                 a newly created GEOM group.
11621             """
11622             # Example: see GEOM_TestOthers.py
11623             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11624             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11625             self._autoPublish(aGroup, theName, "group")
11626             return aGroup
11627
11628         ## Cut of lists of groups.
11629         #  New group is created. It will contain only entities
11630         #  which are present in groups listed in theGList1 but 
11631         #  are not present in groups from theGList2.
11632         #  @param theGList1 is a list of GEOM groups to include elements of.
11633         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11634         #  @param theName Object name; when specified, this parameter is used
11635         #         for result publication in the study. Otherwise, if automatic
11636         #         publication is switched on, default value is used for result name.
11637         #
11638         #  @return a newly created GEOM group.
11639         #
11640         #  @ref tui_cut_groups_anchor "Example"
11641         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11642             """
11643             Cut of lists of groups.
11644             New group is created. It will contain only entities
11645             which are present in groups listed in theGList1 but 
11646             are not present in groups from theGList2.
11647
11648             Parameters:
11649                 theGList1 is a list of GEOM groups to include elements of.
11650                 theGList2 is a list of GEOM groups to exclude elements of.
11651                 theName Object name; when specified, this parameter is used
11652                         for result publication in the study. Otherwise, if automatic
11653                         publication is switched on, default value is used for result name.
11654
11655             Returns:
11656                 a newly created GEOM group.
11657             """
11658             # Example: see GEOM_TestOthers.py
11659             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11660             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11661             self._autoPublish(aGroup, theName, "group")
11662             return aGroup
11663
11664         ## Returns a list of sub-objects ID stored in the group
11665         #  @param theGroup is a GEOM group for which a list of IDs is requested
11666         #
11667         #  @ref swig_GetObjectIDs "Example"
11668         def GetObjectIDs(self,theGroup):
11669             """
11670             Returns a list of sub-objects ID stored in the group
11671
11672             Parameters:
11673                 theGroup is a GEOM group for which a list of IDs is requested
11674             """
11675             # Example: see GEOM_TestOthers.py
11676             ListIDs = self.GroupOp.GetObjects(theGroup)
11677             RaiseIfFailed("GetObjects", self.GroupOp)
11678             return ListIDs
11679
11680         ## Returns a type of sub-objects stored in the group
11681         #  @param theGroup is a GEOM group which type is returned.
11682         #
11683         #  @ref swig_GetType "Example"
11684         def GetType(self,theGroup):
11685             """
11686             Returns a type of sub-objects stored in the group
11687
11688             Parameters:
11689                 theGroup is a GEOM group which type is returned.
11690             """
11691             # Example: see GEOM_TestOthers.py
11692             aType = self.GroupOp.GetType(theGroup)
11693             RaiseIfFailed("GetType", self.GroupOp)
11694             return aType
11695
11696         ## Convert a type of geom object from id to string value
11697         #  @param theId is a GEOM obect type id.
11698         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11699         #  @ref swig_GetType "Example"
11700         def ShapeIdToType(self, theId):
11701             """
11702             Convert a type of geom object from id to string value
11703
11704             Parameters:
11705                 theId is a GEOM obect type id.
11706                 
11707             Returns:
11708                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11709             """
11710             if theId == 0:
11711                 return "COPY"
11712             if theId == 1:
11713                 return "IMPORT"
11714             if theId == 2:
11715                 return "POINT"
11716             if theId == 3:
11717                 return "VECTOR"
11718             if theId == 4:
11719                 return "PLANE"
11720             if theId == 5:
11721                 return "LINE"
11722             if theId == 6:
11723                 return "TORUS"
11724             if theId == 7:
11725                 return "BOX"
11726             if theId == 8:
11727                 return "CYLINDER"
11728             if theId == 9:
11729                 return "CONE"
11730             if theId == 10:
11731                 return "SPHERE"
11732             if theId == 11:
11733                 return "PRISM"
11734             if theId == 12:
11735                 return "REVOLUTION"
11736             if theId == 13:
11737                 return "BOOLEAN"
11738             if theId == 14:
11739                 return "PARTITION"
11740             if theId == 15:
11741                 return "POLYLINE"
11742             if theId == 16:
11743                 return "CIRCLE"
11744             if theId == 17:
11745                 return "SPLINE"
11746             if theId == 18:
11747                 return "ELLIPSE"
11748             if theId == 19:
11749                 return "CIRC_ARC"
11750             if theId == 20:
11751                 return "FILLET"
11752             if theId == 21:
11753                 return "CHAMFER"
11754             if theId == 22:
11755                 return "EDGE"
11756             if theId == 23:
11757                 return "WIRE"
11758             if theId == 24:
11759                 return "FACE"
11760             if theId == 25:
11761                 return "SHELL"
11762             if theId == 26:
11763                 return "SOLID"
11764             if theId == 27:
11765                 return "COMPOUND"
11766             if theId == 28:
11767                 return "SUBSHAPE"
11768             if theId == 29:
11769                 return "PIPE"
11770             if theId == 30:
11771                 return "ARCHIMEDE"
11772             if theId == 31:
11773                 return "FILLING"
11774             if theId == 32:
11775                 return "EXPLODE"
11776             if theId == 33:
11777                 return "GLUED"
11778             if theId == 34:
11779                 return "SKETCHER"
11780             if theId == 35:
11781                 return "CDG"
11782             if theId == 36:
11783                 return "FREE_BOUNDS"
11784             if theId == 37:
11785                 return "GROUP"
11786             if theId == 38:
11787                 return "BLOCK"
11788             if theId == 39:
11789                 return "MARKER"
11790             if theId == 40:
11791                 return "THRUSECTIONS"
11792             if theId == 41:
11793                 return "COMPOUNDFILTER"
11794             if theId == 42:
11795                 return "SHAPES_ON_SHAPE"
11796             if theId == 43:
11797                 return "ELLIPSE_ARC"
11798             if theId == 44:
11799                 return "3DSKETCHER"
11800             if theId == 45:
11801                 return "FILLET_2D"
11802             if theId == 46:
11803                 return "FILLET_1D"
11804             if theId == 201:
11805                 return "PIPETSHAPE"
11806             return "Shape Id not exist."
11807
11808         ## Returns a main shape associated with the group
11809         #  @param theGroup is a GEOM group for which a main shape object is requested
11810         #  @return a GEOM object which is a main shape for theGroup
11811         #
11812         #  @ref swig_GetMainShape "Example"
11813         def GetMainShape(self,theGroup):
11814             """
11815             Returns a main shape associated with the group
11816
11817             Parameters:
11818                 theGroup is a GEOM group for which a main shape object is requested
11819
11820             Returns:
11821                 a GEOM object which is a main shape for theGroup
11822
11823             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11824             """
11825             # Example: see GEOM_TestOthers.py
11826             anObj = self.GroupOp.GetMainShape(theGroup)
11827             RaiseIfFailed("GetMainShape", self.GroupOp)
11828             return anObj
11829
11830         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11831         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11832         #  @param theShape given shape (see GEOM.GEOM_Object)
11833         #  @param min_length minimum length of edges of theShape
11834         #  @param max_length maximum length of edges of theShape
11835         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11836         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11837         #  @param theName Object name; when specified, this parameter is used
11838         #         for result publication in the study. Otherwise, if automatic
11839         #         publication is switched on, default value is used for result name.
11840         #
11841         #  @return a newly created GEOM group of edges
11842         #
11843         #  @@ref swig_todo "Example"
11844         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11845             """
11846             Create group of edges of theShape, whose length is in range [min_length, max_length].
11847             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11848
11849             Parameters:
11850                 theShape given shape
11851                 min_length minimum length of edges of theShape
11852                 max_length maximum length of edges of theShape
11853                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11854                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11855                 theName Object name; when specified, this parameter is used
11856                         for result publication in the study. Otherwise, if automatic
11857                         publication is switched on, default value is used for result name.
11858
11859              Returns:
11860                 a newly created GEOM group of edges.
11861             """
11862             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11863             edges_in_range = []
11864             for edge in edges:
11865                 Props = self.BasicProperties(edge)
11866                 if min_length <= Props[0] and Props[0] <= max_length:
11867                     if (not include_min) and (min_length == Props[0]):
11868                         skip = 1
11869                     else:
11870                         if (not include_max) and (Props[0] == max_length):
11871                             skip = 1
11872                         else:
11873                             edges_in_range.append(edge)
11874
11875             if len(edges_in_range) <= 0:
11876                 print "No edges found by given criteria"
11877                 return None
11878
11879             # note: auto-publishing is done in self.CreateGroup()
11880             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11881             self.UnionList(group_edges, edges_in_range)
11882
11883             return group_edges
11884
11885         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11886         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11887         #  @param min_length minimum length of edges of selected shape
11888         #  @param max_length maximum length of edges of selected shape
11889         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11890         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11891         #  @return a newly created GEOM group of edges
11892         #  @ref swig_todo "Example"
11893         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11894             """
11895             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11896             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11897
11898             Parameters:
11899                 min_length minimum length of edges of selected shape
11900                 max_length maximum length of edges of selected shape
11901                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11902                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11903
11904              Returns:
11905                 a newly created GEOM group of edges.
11906             """
11907             nb_selected = sg.SelectedCount()
11908             if nb_selected < 1:
11909                 print "Select a shape before calling this function, please."
11910                 return 0
11911             if nb_selected > 1:
11912                 print "Only one shape must be selected"
11913                 return 0
11914
11915             id_shape = sg.getSelected(0)
11916             shape = IDToObject( id_shape )
11917
11918             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11919
11920             left_str  = " < "
11921             right_str = " < "
11922             if include_min: left_str  = " <= "
11923             if include_max: right_str  = " <= "
11924
11925             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11926                                     + left_str + "length" + right_str + `max_length`)
11927
11928             sg.updateObjBrowser(1)
11929
11930             return group_edges
11931
11932         # end of l3_groups
11933         ## @}
11934
11935         ## @addtogroup l4_advanced
11936         ## @{
11937
11938         ## Create a T-shape object with specified caracteristics for the main
11939         #  and the incident pipes (radius, width, half-length).
11940         #  The extremities of the main pipe are located on junctions points P1 and P2.
11941         #  The extremity of the incident pipe is located on junction point P3.
11942         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11943         #  the main plane of the T-shape is XOY.
11944         #
11945         #  @param theR1 Internal radius of main pipe
11946         #  @param theW1 Width of main pipe
11947         #  @param theL1 Half-length of main pipe
11948         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11949         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11950         #  @param theL2 Half-length of incident pipe
11951         #
11952         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11953         #  @param theP1 1st junction point of main pipe
11954         #  @param theP2 2nd junction point of main pipe
11955         #  @param theP3 Junction point of incident pipe
11956         #
11957         #  @param theRL Internal radius of left thickness reduction
11958         #  @param theWL Width of left thickness reduction
11959         #  @param theLtransL Length of left transition part
11960         #  @param theLthinL Length of left thin part
11961         #
11962         #  @param theRR Internal radius of right thickness reduction
11963         #  @param theWR Width of right thickness reduction
11964         #  @param theLtransR Length of right transition part
11965         #  @param theLthinR Length of right thin part
11966         #
11967         #  @param theRI Internal radius of incident thickness reduction
11968         #  @param theWI Width of incident thickness reduction
11969         #  @param theLtransI Length of incident transition part
11970         #  @param theLthinI Length of incident thin part
11971         #
11972         #  @param theName Object name; when specified, this parameter is used
11973         #         for result publication in the study. Otherwise, if automatic
11974         #         publication is switched on, default value is used for result name.
11975         #
11976         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11977         #
11978         #  @ref tui_creation_pipetshape "Example"
11979         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11980                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11981                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11982                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11983                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11984                             theName=None):
11985             """
11986             Create a T-shape object with specified caracteristics for the main
11987             and the incident pipes (radius, width, half-length).
11988             The extremities of the main pipe are located on junctions points P1 and P2.
11989             The extremity of the incident pipe is located on junction point P3.
11990             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11991             the main plane of the T-shape is XOY.
11992
11993             Parameters:
11994                 theR1 Internal radius of main pipe
11995                 theW1 Width of main pipe
11996                 theL1 Half-length of main pipe
11997                 theR2 Internal radius of incident pipe (R2 < R1)
11998                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11999                 theL2 Half-length of incident pipe
12000                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12001                 theP1 1st junction point of main pipe
12002                 theP2 2nd junction point of main pipe
12003                 theP3 Junction point of incident pipe
12004
12005                 theRL Internal radius of left thickness reduction
12006                 theWL Width of left thickness reduction
12007                 theLtransL Length of left transition part
12008                 theLthinL Length of left thin part
12009
12010                 theRR Internal radius of right thickness reduction
12011                 theWR Width of right thickness reduction
12012                 theLtransR Length of right transition part
12013                 theLthinR Length of right thin part
12014
12015                 theRI Internal radius of incident thickness reduction
12016                 theWI Width of incident thickness reduction
12017                 theLtransI Length of incident transition part
12018                 theLthinI Length of incident thin part
12019
12020                 theName Object name; when specified, this parameter is used
12021                         for result publication in the study. Otherwise, if automatic
12022                         publication is switched on, default value is used for result name.
12023
12024             Returns:
12025                 List of GEOM_Object, containing the created shape and propagation groups.
12026
12027             Example of usage:
12028                 # create PipeTShape object
12029                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
12030                 # create PipeTShape object with position
12031                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
12032                 # create PipeTShape object with left thickness reduction
12033                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12034             """
12035             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)
12036             if (theP1 and theP2 and theP3):
12037                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12038                                                                 theRL, theWL, theLtransL, theLthinL,
12039                                                                 theRR, theWR, theLtransR, theLthinR,
12040                                                                 theRI, theWI, theLtransI, theLthinI,
12041                                                                 theHexMesh, theP1, theP2, theP3)
12042             else:
12043                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
12044                                                     theRL, theWL, theLtransL, theLthinL,
12045                                                     theRR, theWR, theLtransR, theLthinR,
12046                                                     theRI, theWI, theLtransI, theLthinI,
12047                                                     theHexMesh)
12048             RaiseIfFailed("MakePipeTShape", self.AdvOp)
12049             if Parameters: anObj[0].SetParameters(Parameters)
12050             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12051             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12052             return anObj
12053
12054         ## Create a T-shape object with chamfer and with specified caracteristics for the main
12055         #  and the incident pipes (radius, width, half-length). The chamfer is
12056         #  created on the junction of the pipes.
12057         #  The extremities of the main pipe are located on junctions points P1 and P2.
12058         #  The extremity of the incident pipe is located on junction point P3.
12059         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12060         #  the main plane of the T-shape is XOY.
12061         #  @param theR1 Internal radius of main pipe
12062         #  @param theW1 Width of main pipe
12063         #  @param theL1 Half-length of main pipe
12064         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12065         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12066         #  @param theL2 Half-length of incident pipe
12067         #  @param theH Height of the chamfer.
12068         #  @param theW Width of the chamfer.
12069         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12070         #  @param theP1 1st junction point of main pipe
12071         #  @param theP2 2nd junction point of main pipe
12072         #  @param theP3 Junction point of incident pipe
12073         #
12074         #  @param theRL Internal radius of left thickness reduction
12075         #  @param theWL Width of left thickness reduction
12076         #  @param theLtransL Length of left transition part
12077         #  @param theLthinL Length of left thin part
12078         #
12079         #  @param theRR Internal radius of right thickness reduction
12080         #  @param theWR Width of right thickness reduction
12081         #  @param theLtransR Length of right transition part
12082         #  @param theLthinR Length of right thin part
12083         #
12084         #  @param theRI Internal radius of incident thickness reduction
12085         #  @param theWI Width of incident thickness reduction
12086         #  @param theLtransI Length of incident transition part
12087         #  @param theLthinI Length of incident thin part
12088         #
12089         #  @param theName Object name; when specified, this parameter is used
12090         #         for result publication in the study. Otherwise, if automatic
12091         #         publication is switched on, default value is used for result name.
12092         #
12093         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12094         #
12095         #  @ref tui_creation_pipetshape "Example"
12096         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
12097                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12098                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12099                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12100                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12101                                    theName=None):
12102             """
12103             Create a T-shape object with chamfer and with specified caracteristics for the main
12104             and the incident pipes (radius, width, half-length). The chamfer is
12105             created on the junction of the pipes.
12106             The extremities of the main pipe are located on junctions points P1 and P2.
12107             The extremity of the incident pipe is located on junction point P3.
12108             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12109             the main plane of the T-shape is XOY.
12110
12111             Parameters:
12112                 theR1 Internal radius of main pipe
12113                 theW1 Width of main pipe
12114                 theL1 Half-length of main pipe
12115                 theR2 Internal radius of incident pipe (R2 < R1)
12116                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12117                 theL2 Half-length of incident pipe
12118                 theH Height of the chamfer.
12119                 theW Width of the chamfer.
12120                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12121                 theP1 1st junction point of main pipe
12122                 theP2 2nd junction point of main pipe
12123                 theP3 Junction point of incident pipe
12124
12125                 theRL Internal radius of left thickness reduction
12126                 theWL Width of left thickness reduction
12127                 theLtransL Length of left transition part
12128                 theLthinL Length of left thin part
12129
12130                 theRR Internal radius of right thickness reduction
12131                 theWR Width of right thickness reduction
12132                 theLtransR Length of right transition part
12133                 theLthinR Length of right thin part
12134
12135                 theRI Internal radius of incident thickness reduction
12136                 theWI Width of incident thickness reduction
12137                 theLtransI Length of incident transition part
12138                 theLthinI Length of incident thin part
12139
12140                 theName Object name; when specified, this parameter is used
12141                         for result publication in the study. Otherwise, if automatic
12142                         publication is switched on, default value is used for result name.
12143
12144             Returns:
12145                 List of GEOM_Object, containing the created shape and propagation groups.
12146
12147             Example of usage:
12148                 # create PipeTShape with chamfer object
12149                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12150                 # create PipeTShape with chamfer object with position
12151                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12152                 # create PipeTShape with chamfer object with left thickness reduction
12153                 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)
12154             """
12155             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)
12156             if (theP1 and theP2 and theP3):
12157               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12158                                                                      theRL, theWL, theLtransL, theLthinL,
12159                                                                      theRR, theWR, theLtransR, theLthinR,
12160                                                                      theRI, theWI, theLtransI, theLthinI,
12161                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12162             else:
12163               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12164                                                          theRL, theWL, theLtransL, theLthinL,
12165                                                          theRR, theWR, theLtransR, theLthinR,
12166                                                          theRI, theWI, theLtransI, theLthinI,
12167                                                          theH, theW, theHexMesh)
12168             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12169             if Parameters: anObj[0].SetParameters(Parameters)
12170             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12171             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12172             return anObj
12173
12174         ## Create a T-shape object with fillet and with specified caracteristics for the main
12175         #  and the incident pipes (radius, width, half-length). The fillet is
12176         #  created on the junction of the pipes.
12177         #  The extremities of the main pipe are located on junctions points P1 and P2.
12178         #  The extremity of the incident pipe is located on junction point P3.
12179         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12180         #  the main plane of the T-shape is XOY.
12181         #  @param theR1 Internal radius of main pipe
12182         #  @param theW1 Width of main pipe
12183         #  @param theL1 Half-length of main pipe
12184         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12185         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12186         #  @param theL2 Half-length of incident pipe
12187         #  @param theRF Radius of curvature of fillet.
12188         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12189         #  @param theP1 1st junction point of main pipe
12190         #  @param theP2 2nd junction point of main pipe
12191         #  @param theP3 Junction point of incident pipe
12192         #
12193         #  @param theRL Internal radius of left thickness reduction
12194         #  @param theWL Width of left thickness reduction
12195         #  @param theLtransL Length of left transition part
12196         #  @param theLthinL Length of left thin part
12197         #
12198         #  @param theRR Internal radius of right thickness reduction
12199         #  @param theWR Width of right thickness reduction
12200         #  @param theLtransR Length of right transition part
12201         #  @param theLthinR Length of right thin part
12202         #
12203         #  @param theRI Internal radius of incident thickness reduction
12204         #  @param theWI Width of incident thickness reduction
12205         #  @param theLtransI Length of incident transition part
12206         #  @param theLthinI Length of incident thin part
12207         #
12208         #  @param theName Object name; when specified, this parameter is used
12209         #         for result publication in the study. Otherwise, if automatic
12210         #         publication is switched on, default value is used for result name.
12211         #
12212         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12213         #
12214         #  @ref tui_creation_pipetshape "Example"
12215         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12216                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12217                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12218                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12219                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12220                                   theName=None):
12221             """
12222             Create a T-shape object with fillet and with specified caracteristics for the main
12223             and the incident pipes (radius, width, half-length). The fillet is
12224             created on the junction of the pipes.
12225             The extremities of the main pipe are located on junctions points P1 and P2.
12226             The extremity of the incident pipe is located on junction point P3.
12227
12228             Parameters:
12229                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12230                 the main plane of the T-shape is XOY.
12231                 theR1 Internal radius of main pipe
12232                 theW1 Width of main pipe
12233                 heL1 Half-length of main pipe
12234                 theR2 Internal radius of incident pipe (R2 < R1)
12235                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12236                 theL2 Half-length of incident pipe
12237                 theRF Radius of curvature of fillet.
12238                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12239                 theP1 1st junction point of main pipe
12240                 theP2 2nd junction point of main pipe
12241                 theP3 Junction point of incident pipe
12242
12243                 theRL Internal radius of left thickness reduction
12244                 theWL Width of left thickness reduction
12245                 theLtransL Length of left transition part
12246                 theLthinL Length of left thin part
12247
12248                 theRR Internal radius of right thickness reduction
12249                 theWR Width of right thickness reduction
12250                 theLtransR Length of right transition part
12251                 theLthinR Length of right thin part
12252
12253                 theRI Internal radius of incident thickness reduction
12254                 theWI Width of incident thickness reduction
12255                 theLtransI Length of incident transition part
12256                 theLthinI Length of incident thin part
12257
12258                 theName Object name; when specified, this parameter is used
12259                         for result publication in the study. Otherwise, if automatic
12260                         publication is switched on, default value is used for result name.
12261                 
12262             Returns:
12263                 List of GEOM_Object, containing the created shape and propagation groups.
12264                 
12265             Example of usage:
12266                 # create PipeTShape with fillet object
12267                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12268                 # create PipeTShape with fillet object with position
12269                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12270                 # create PipeTShape with fillet object with left thickness reduction
12271                 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)
12272             """
12273             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)
12274             if (theP1 and theP2 and theP3):
12275               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12276                                                                     theRL, theWL, theLtransL, theLthinL,
12277                                                                     theRR, theWR, theLtransR, theLthinR,
12278                                                                     theRI, theWI, theLtransI, theLthinI,
12279                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12280             else:
12281               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12282                                                         theRL, theWL, theLtransL, theLthinL,
12283                                                         theRR, theWR, theLtransR, theLthinR,
12284                                                         theRI, theWI, theLtransI, theLthinI,
12285                                                         theRF, theHexMesh)
12286             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12287             if Parameters: anObj[0].SetParameters(Parameters)
12288             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12289             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12290             return anObj
12291
12292         ## This function allows creating a disk already divided into blocks. It
12293         #  can be used to create divided pipes for later meshing in hexaedra.
12294         #  @param theR Radius of the disk
12295         #  @param theOrientation Orientation of the plane on which the disk will be built
12296         #         1 = XOY, 2 = OYZ, 3 = OZX
12297         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12298         #  @param theName Object name; when specified, this parameter is used
12299         #         for result publication in the study. Otherwise, if automatic
12300         #         publication is switched on, default value is used for result name.
12301         #
12302         #  @return New GEOM_Object, containing the created shape.
12303         #
12304         #  @ref tui_creation_divideddisk "Example"
12305         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12306             """
12307             Creates a disk, divided into blocks. It can be used to create divided pipes
12308             for later meshing in hexaedra.
12309
12310             Parameters:
12311                 theR Radius of the disk
12312                 theOrientation Orientation of the plane on which the disk will be built:
12313                                1 = XOY, 2 = OYZ, 3 = OZX
12314                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12315                 theName Object name; when specified, this parameter is used
12316                         for result publication in the study. Otherwise, if automatic
12317                         publication is switched on, default value is used for result name.
12318
12319             Returns:
12320                 New GEOM_Object, containing the created shape.
12321             """
12322             theR, Parameters = ParseParameters(theR)
12323             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12324             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12325             if Parameters: anObj.SetParameters(Parameters)
12326             self._autoPublish(anObj, theName, "dividedDisk")
12327             return anObj
12328             
12329         ## This function allows creating a disk already divided into blocks. It
12330         #  can be used to create divided pipes for later meshing in hexaedra.
12331         #  @param theCenter Center of the disk
12332         #  @param theVector Normal vector to the plane of the created disk
12333         #  @param theRadius Radius of the disk
12334         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12335         #  @param theName Object name; when specified, this parameter is used
12336         #         for result publication in the study. Otherwise, if automatic
12337         #         publication is switched on, default value is used for result name.
12338         #
12339         #  @return New GEOM_Object, containing the created shape.
12340         #
12341         #  @ref tui_creation_divideddisk "Example"
12342         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12343             """
12344             Creates a disk already divided into blocks. It can be used to create divided pipes
12345             for later meshing in hexaedra.
12346
12347             Parameters:
12348                 theCenter Center of the disk
12349                 theVector Normal vector to the plane of the created disk
12350                 theRadius Radius of the disk
12351                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12352                 theName Object name; when specified, this parameter is used
12353                         for result publication in the study. Otherwise, if automatic
12354                         publication is switched on, default value is used for result name.
12355
12356             Returns:
12357                 New GEOM_Object, containing the created shape.
12358             """
12359             theRadius, Parameters = ParseParameters(theRadius)
12360             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12361             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12362             if Parameters: anObj.SetParameters(Parameters)
12363             self._autoPublish(anObj, theName, "dividedDisk")
12364             return anObj
12365
12366         ## Builds a cylinder prepared for hexa meshes
12367         #  @param theR Radius of the cylinder
12368         #  @param theH Height of the cylinder
12369         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12370         #  @param theName Object name; when specified, this parameter is used
12371         #         for result publication in the study. Otherwise, if automatic
12372         #         publication is switched on, default value is used for result name.
12373         #
12374         #  @return New GEOM_Object, containing the created shape.
12375         #
12376         #  @ref tui_creation_dividedcylinder "Example"
12377         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12378             """
12379             Builds a cylinder prepared for hexa meshes
12380
12381             Parameters:
12382                 theR Radius of the cylinder
12383                 theH Height of the cylinder
12384                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12385                 theName Object name; when specified, this parameter is used
12386                         for result publication in the study. Otherwise, if automatic
12387                         publication is switched on, default value is used for result name.
12388
12389             Returns:
12390                 New GEOM_Object, containing the created shape.
12391             """
12392             theR, theH, Parameters = ParseParameters(theR, theH)
12393             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12394             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12395             if Parameters: anObj.SetParameters(Parameters)
12396             self._autoPublish(anObj, theName, "dividedCylinder")
12397             return anObj
12398
12399         ## Create a surface from a cloud of points
12400         #  @param thelPoints list of points
12401         #  @return New GEOM_Object, containing the created shape.
12402         #
12403         #  @ref tui_creation_smoothingsurface "Example"
12404         def MakeSmoothingSurface(self, thelPoints):
12405             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints)
12406             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12407             return anObj
12408
12409         ## Export a shape to XAO format
12410         #  @param shape The shape to export
12411         #  @param groups The list of groups to export
12412         #  @param fields The list of fields to export
12413         #  @param author The author of the export
12414         #  @param fileName The name of the file to export
12415         #  @return boolean
12416         #
12417         #  @ref tui_exportxao "Example"
12418         def ExportXAO(self, shape, groups, fields, author, fileName):
12419             res = self.InsertOp.ExportXAO(shape, groups, fields, author, fileName)
12420             RaiseIfFailed("ExportXAO", self.InsertOp)
12421             return res
12422
12423         ## Import a shape from XAO format
12424         #  @param shape Shape to export
12425         #  @param fileName The name of the file to import
12426         #  @return tuple (res, shape, subShapes, groups, fields)
12427         #       res Flag indicating if the import was successful
12428         #       shape The imported shape
12429         #       subShapes The list of imported subShapes
12430         #       groups The list of imported groups
12431         #       fields The list of imported fields
12432         #
12433         #  @ref tui_importxao "Example"
12434         def ImportXAO(self, fileName):
12435             res = self.InsertOp.ImportXAO(fileName)
12436             RaiseIfFailed("ImportXAO", self.InsertOp)
12437             return res
12438
12439         #@@ insert new functions before this line @@ do not remove this line @@#
12440
12441         # end of l4_advanced
12442         ## @}
12443
12444         ## Create a copy of the given object
12445         #
12446         #  @param theOriginal geometry object for copy
12447         #  @param theName Object name; when specified, this parameter is used
12448         #         for result publication in the study. Otherwise, if automatic
12449         #         publication is switched on, default value is used for result name.
12450         #
12451         #  @return New GEOM_Object, containing the copied shape.
12452         #
12453         #  @ingroup l1_geomBuilder_auxiliary
12454         #  @ref swig_MakeCopy "Example"
12455         def MakeCopy(self, theOriginal, theName=None):
12456             """
12457             Create a copy of the given object
12458
12459             Parameters:
12460                 theOriginal geometry object for copy
12461                 theName Object name; when specified, this parameter is used
12462                         for result publication in the study. Otherwise, if automatic
12463                         publication is switched on, default value is used for result name.
12464
12465             Returns:
12466                 New GEOM_Object, containing the copied shape.
12467
12468             Example of usage: Copy = geompy.MakeCopy(Box)
12469             """
12470             # Example: see GEOM_TestAll.py
12471             anObj = self.InsertOp.MakeCopy(theOriginal)
12472             RaiseIfFailed("MakeCopy", self.InsertOp)
12473             self._autoPublish(anObj, theName, "copy")
12474             return anObj
12475
12476         ## Add Path to load python scripts from
12477         #  @param Path a path to load python scripts from
12478         #  @ingroup l1_geomBuilder_auxiliary
12479         def addPath(self,Path):
12480             """
12481             Add Path to load python scripts from
12482
12483             Parameters:
12484                 Path a path to load python scripts from
12485             """
12486             if (sys.path.count(Path) < 1):
12487                 sys.path.append(Path)
12488                 pass
12489             pass
12490
12491         ## Load marker texture from the file
12492         #  @param Path a path to the texture file
12493         #  @return unique texture identifier
12494         #  @ingroup l1_geomBuilder_auxiliary
12495         def LoadTexture(self, Path):
12496             """
12497             Load marker texture from the file
12498             
12499             Parameters:
12500                 Path a path to the texture file
12501                 
12502             Returns:
12503                 unique texture identifier
12504             """
12505             # Example: see GEOM_TestAll.py
12506             ID = self.InsertOp.LoadTexture(Path)
12507             RaiseIfFailed("LoadTexture", self.InsertOp)
12508             return ID
12509
12510         ## Get internal name of the object based on its study entry
12511         #  @note This method does not provide an unique identifier of the geometry object.
12512         #  @note This is internal function of GEOM component, though it can be used outside it for 
12513         #  appropriate reason (e.g. for identification of geometry object).
12514         #  @param obj geometry object
12515         #  @return unique object identifier
12516         #  @ingroup l1_geomBuilder_auxiliary
12517         def getObjectID(self, obj):
12518             """
12519             Get internal name of the object based on its study entry.
12520             Note: this method does not provide an unique identifier of the geometry object.
12521             It is an internal function of GEOM component, though it can be used outside GEOM for 
12522             appropriate reason (e.g. for identification of geometry object).
12523
12524             Parameters:
12525                 obj geometry object
12526
12527             Returns:
12528                 unique object identifier
12529             """
12530             ID = ""
12531             entry = salome.ObjectToID(obj)
12532             if entry is not None:
12533                 lst = entry.split(":")
12534                 if len(lst) > 0:
12535                     ID = lst[-1] # -1 means last item in the list            
12536                     return "GEOM_" + ID
12537             return ID
12538                 
12539             
12540
12541         ## Add marker texture. @a Width and @a Height parameters
12542         #  specify width and height of the texture in pixels.
12543         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12544         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12545         #  parameter should be unpacked string, in which '1' symbols represent opaque
12546         #  pixels and '0' represent transparent pixels of the texture bitmap.
12547         #
12548         #  @param Width texture width in pixels
12549         #  @param Height texture height in pixels
12550         #  @param Texture texture data
12551         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12552         #  @return unique texture identifier
12553         #  @ingroup l1_geomBuilder_auxiliary
12554         def AddTexture(self, Width, Height, Texture, RowData=False):
12555             """
12556             Add marker texture. Width and Height parameters
12557             specify width and height of the texture in pixels.
12558             If RowData is True, Texture parameter should represent texture data
12559             packed into the byte array. If RowData is False (default), Texture
12560             parameter should be unpacked string, in which '1' symbols represent opaque
12561             pixels and '0' represent transparent pixels of the texture bitmap.
12562
12563             Parameters:
12564                 Width texture width in pixels
12565                 Height texture height in pixels
12566                 Texture texture data
12567                 RowData if True, Texture data are packed in the byte stream
12568
12569             Returns:
12570                 return unique texture identifier
12571             """
12572             if not RowData: Texture = PackData(Texture)
12573             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12574             RaiseIfFailed("AddTexture", self.InsertOp)
12575             return ID
12576
12577         ## Creates a new folder object. It is a container for any GEOM objects.
12578         #  @param Name name of the container
12579         #  @param Father parent object. If None, 
12580         #         folder under 'Geometry' root object will be created.
12581         #  @return a new created folder
12582         def NewFolder(self, Name, Father=None):
12583             """
12584             Create a new folder object. It is an auxiliary container for any GEOM objects.
12585             
12586             Parameters:
12587                 Name name of the container
12588                 Father parent object. If None, 
12589                 folder under 'Geometry' root object will be created.
12590             
12591             Returns:
12592                 a new created folder
12593             """
12594             if not Father: Father = self.father
12595             return self.CreateFolder(Name, Father)
12596
12597         ## Move object to the specified folder
12598         #  @param Object object to move
12599         #  @param Folder target folder
12600         def PutToFolder(self, Object, Folder):
12601             """
12602             Move object to the specified folder
12603             
12604             Parameters:
12605                 Object object to move
12606                 Folder target folder
12607             """
12608             self.MoveToFolder(Object, Folder)
12609             pass
12610
12611         ## Move list of objects to the specified folder
12612         #  @param ListOfSO list of objects to move
12613         #  @param Folder target folder
12614         def PutListToFolder(self, ListOfSO, Folder):
12615             """
12616             Move list of objects to the specified folder
12617             
12618             Parameters:
12619                 ListOfSO list of objects to move
12620                 Folder target folder
12621             """
12622             self.MoveListToFolder(ListOfSO, Folder)
12623             pass
12624
12625         ## @addtogroup l2_field
12626         ## @{
12627
12628         ## Creates a field
12629         #  @param shape the shape the field lies on
12630         #  @param name the field name
12631         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12632         #  @param dimension dimension of the shape the field lies on
12633         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12634         #  @param componentNames names of components
12635         #  @return a created field
12636         def CreateField(self, shape, name, type, dimension, componentNames):
12637             """
12638             Creates a field
12639
12640             Parameters:
12641                 shape the shape the field lies on
12642                 name  the field name
12643                 type  type of field data
12644                 dimension dimension of the shape the field lies on
12645                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12646                 componentNames names of components
12647             
12648             Returns:
12649                 a created field
12650             """
12651             if isinstance( type, int ):
12652                 if type < 0 or type > 3:
12653                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12654                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12655
12656             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12657             RaiseIfFailed("CreateField", self.FieldOp)
12658             global geom
12659             geom._autoPublish( f, "", name)
12660             return f
12661
12662         ## Removes a field from the GEOM component
12663         #  @param field the field to remove
12664         def RemoveField(self, field):
12665             "Removes a field from the GEOM component"
12666             global geom
12667             if isinstance( field, GEOM._objref_GEOM_Field ):
12668                 geom.RemoveObject( field )
12669             elif isinstance( field, geomField ):
12670                 geom.RemoveObject( field.field )
12671             else:
12672                 raise RuntimeError, "RemoveField() : the object is not a field"
12673             return
12674
12675         ## Returns number of fields on a shape
12676         def CountFields(self, shape):
12677             "Returns number of fields on a shape"
12678             nb = self.FieldOp.CountFields( shape )
12679             RaiseIfFailed("CountFields", self.FieldOp)
12680             return nb
12681
12682         ## Returns all fields on a shape
12683         def GetFields(self, shape):
12684             "Returns all fields on a shape"
12685             ff = self.FieldOp.GetFields( shape )
12686             RaiseIfFailed("GetFields", self.FieldOp)
12687             return ff
12688
12689         ## Returns a field on a shape by its name
12690         def GetField(self, shape, name):
12691             "Returns a field on a shape by its name"
12692             f = self.FieldOp.GetField( shape, name )
12693             RaiseIfFailed("GetField", self.FieldOp)
12694             return f
12695
12696         # end of l2_field
12697         ## @}
12698
12699
12700 import omniORB
12701 # Register the new proxy for GEOM_Gen
12702 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12703
12704
12705 ## Field on Geometry
12706 #  @ingroup l2_field
12707 class geomField( GEOM._objref_GEOM_Field ):
12708
12709     def __init__(self):
12710         GEOM._objref_GEOM_Field.__init__(self)
12711         self.field = GEOM._objref_GEOM_Field
12712         return
12713
12714     ## Returns the shape the field lies on
12715     def getShape(self):
12716         "Returns the shape the field lies on"
12717         return self.field.GetShape(self)
12718
12719     ## Returns the field name
12720     def getName(self):
12721         "Returns the field name"
12722         return self.field.GetName(self)
12723
12724     ## Returns type of field data as integer [0-3]
12725     def getType(self):
12726         "Returns type of field data"
12727         return self.field.GetDataType(self)._v
12728
12729     ## Returns type of field data:
12730     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
12731     def getTypeEnum(self):
12732         "Returns type of field data"
12733         return self.field.GetDataType(self)
12734
12735     ## Returns dimension of the shape the field lies on:
12736     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12737     def getDimension(self):
12738         """Returns dimension of the shape the field lies on:
12739         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
12740         return self.field.GetDimension(self)
12741
12742     ## Returns names of components
12743     def getComponents(self):
12744         "Returns names of components"
12745         return self.field.GetComponents(self)
12746
12747     ## Adds a time step to the field
12748     #  @param step the time step number futher used as the step identifier
12749     #  @param stamp the time step time
12750     #  @param values the values of the time step
12751     def addStep(self, step, stamp, values):
12752         "Adds a time step to the field"
12753         stp = self.field.AddStep( self, step, stamp )
12754         if not stp:
12755             raise RuntimeError, \
12756                   "Field.addStep() : Error: step %s already exists in this field"%step
12757         global geom
12758         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
12759         self.setValues( step, values )
12760         return stp
12761
12762     ## Remove a time step from the field
12763     def removeStep(self,step):
12764         "Remove a time step from the field"
12765         stepSO = None
12766         try:
12767             stepObj = self.field.GetStep( self, step )
12768             if stepObj:
12769                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
12770         except:
12771             #import traceback
12772             #traceback.print_exc()
12773             pass
12774         self.field.RemoveStep( self, step )
12775         if stepSO:
12776             geom.myBuilder.RemoveObjectWithChildren( stepSO )
12777         return
12778
12779     ## Returns number of time steps in the field
12780     def countSteps(self):
12781         "Returns number of time steps in the field"
12782         return self.field.CountSteps(self)
12783
12784     ## Returns a list of time step IDs in the field
12785     def getSteps(self):
12786         "Returns a list of time step IDs in the field"
12787         return self.field.GetSteps(self)
12788
12789     ## Returns a time step by its ID
12790     def getStep(self,step):
12791         "Returns a time step by its ID"
12792         stp = self.field.GetStep(self, step)
12793         if not stp:
12794             raise RuntimeError, "Step %s is missing from this field"%step
12795         return stp
12796
12797     ## Returns the time of the field step
12798     def getStamp(self,step):
12799         "Returns the time of the field step"
12800         return self.getStep(step).GetStamp()
12801
12802     ## Changes the time of the field step
12803     def setStamp(self, step, stamp):
12804         "Changes the time of the field step"
12805         return self.getStep(step).SetStamp(stamp)
12806
12807     ## Returns values of the field step
12808     def getValues(self, step):
12809         "Returns values of the field step"
12810         return self.getStep(step).GetValues()
12811
12812     ## Changes values of the field step
12813     def setValues(self, step, values):
12814         "Changes values of the field step"
12815         stp = self.getStep(step)
12816         errBeg = "Field.setValues(values) : Error: "
12817         try:
12818             ok = stp.SetValues( values )
12819         except Exception, e:
12820             excStr = str(e)
12821             if excStr.find("WrongPythonType") > 0:
12822                 raise RuntimeError, errBeg +\
12823                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
12824             raise RuntimeError, errBeg + str(e)
12825         if not ok:
12826             nbOK = self.field.GetArraySize(self)
12827             nbKO = len(values)
12828             if nbOK != nbKO:
12829                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
12830             else:
12831                 raise RuntimeError, errBeg + "failed"
12832         return
12833
12834     pass # end of class geomField
12835
12836 # Register the new proxy for GEOM_Field
12837 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
12838
12839
12840 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12841 #  interface to GEOM operations.
12842 #
12843 #  Typical use is:
12844 #  \code
12845 #    import salome
12846 #    salome.salome_init()
12847 #    from salome.geom import geomBuilder
12848 #    geompy = geomBuilder.New(salome.myStudy)
12849 #  \endcode
12850 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12851 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12852 #  @return geomBuilder instance
12853 def New( study, instance=None):
12854     """
12855     Create a new geomBuilder instance.The geomBuilder class provides the Python
12856     interface to GEOM operations.
12857
12858     Typical use is:
12859         import salome
12860         salome.salome_init()
12861         from salome.geom import geomBuilder
12862         geompy = geomBuilder.New(salome.myStudy)
12863
12864     Parameters:
12865         study     SALOME study, generally obtained by salome.myStudy.
12866         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12867     Returns:
12868         geomBuilder instance
12869     """
12870     #print "New geomBuilder ", study, instance
12871     global engine
12872     global geom
12873     global doLcc
12874     engine = instance
12875     if engine is None:
12876       doLcc = True
12877     geom = geomBuilder()
12878     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12879     geom.init_geom(study)
12880     return geom